-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google DNS A Records are not overwritten #624
Comments
Could you please indicate which version of the |
sure its pulumi-gcp-5.8.1 |
pulumi_gcp 4.5.2 with pulumi 2.25.2 is still working after my last test done now and it will update the records sets if they exists, il try to figure out the version now where the bug is first time seen, probably from pulumi_gcp 5* Update: i did some more testing...
|
Yeah I have a similar issue, basically it tries to do a replace when modifying the RRDATAS which fails because you cant have two records with the same name. |
In my case it is the same stack, just try to create and then modify a rrset, you will see it does a replace instead of an update. But might be a fault upstream in the terraform provider. |
in my case yes, i use a stack A create the dns record sets and if we delete the cluster we also delete the stack, if we create again the cluster than a new stack B would try to overright the dns recordsets with the ip of the new cluster...which should work and did work... |
@Arturx47 Interesting. When you perform the Here's what I attempted to reproduce what both @Sytten and @Arturx47 are describing above:
I'll leave this issue to track the upstream bug around replace vs. update. |
Hello, i did not use pulumi destroy i did just delete the stack, as we hold it...now i was saying that if the dns record exists before the stack, than when you create the stack and put pulumi to update it it will fail and will not do a replace.
As from my understanding if the dns record exists beforehand of the stack, that is meaning not created by the stack or created by other stack, as the resource is an authoritative record set, when i created a stack and the stack finds an A record lets say record A with ip 192.168.1.1 and it has a different ip for it lets say 192.168.1.2 in the past it would simply replace it...now its complaining that record set it is already existing. |
If the record already exists beforehand, then Pulumi will have no knowledge of that record. What you will want to do in that case is import the record so that it can be managed as part of your stack (see https://www.pulumi.com/docs/guides/adopting/import/) before modifying it. |
Thank you, i know about importing but this was working well as described in pulumi 2, and its not working now anymore...moreover in the description from the code it says... ." > Note: The provider treats this resource as an authoritative record set. This means existing records (including This means that exactly this should happen even if they are existing beforehand. |
@Arturx47 The latest version of the provider doesn't have that note in the documentation. Are you picking that up from the previous version? I believe the resource behavior has changed upstream given the change in hashicorp/terraform-provider-google#8835 |
hello, from pulumi-gcp 4.5.2 so you are saying that this will no longer be supported? |
The upstream issue with replace-vs-update has been fixed a long time ago in GoogleCloudPlatform/magic-modules#5191 According to #624 (comment) I'll go ahead and close the issue as done. Please open a new issue if things aren't working as folks expect. |
The google Dns records are not overwritten using pulumi_gcp in pulumi 3.X
Steps to reproduce
We got a problem with the pulumi_gcp, the existing DNS records are not overwritten anymore,
pulumi fails with resource is existing…in python
It was working on pulumi 2.6(i think its not working from 2.8) anyways its not working anymore in 3.3.1(last one tested, but i was also having the issue in 3.6 i think) … i need to make sure to delete all the existing records sets before…so it does not exit with 1
we use exactly the same code as the documentation and it was working....
class RecordSet(pulumi.CustomResource):
def init(self,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
managed_zone: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
rrdatas: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
ttl: Optional[pulumi.Input[int]] = None,
type: Optional[pulumi.Input[str]] = None,
props=None,
name=None,
opts=None):
1.Install pulumi 3.3.1
2.create a dns record with ip x of type A
3.create a stack in pulumi and put that stack, to create the dns record with a different ip address
Expected:
Update the the ip address of an existing dns record...
Actual:
Error creating ResourceDnsRecordSet: googleapi: Error 409: The resource 'entity.rrset' named 'test.test2.com. (A)' already exists, alreadyExists
The text was updated successfully, but these errors were encountered: