I have noticed that when using Pulumi with Cloudfl...
# general
c
I have noticed that when using Pulumi with Cloudflare (in TypeScript:
import * as cloudflare from "@pulumi/cloudflare";
) to setup some DNS records it fails to "move" some DNS resources as it does not change a DNS record and instead tries to create the new version of it causing a conflict since the same DNS CNAME record named "cname-record" cannot be created, which then causes the whole upgrade to fail. I've noticed that I first have to comment out (in separate calls of
pulumi up
) the DNS record declaration and then introducing it again after the DNS record has been deleted so that it then can be added again with the new value. Am I alone with this? Is it intended?
l
This sounds like you're changing the Pulumi name (1st arg to constructor) at the same time as you're changing the content of the record. You shouldn't do this, as the Pulumi name property is what Pulumi uses to find the resource in the state.
You can do it if you use aliases correctly, but generally, I recommend changing the record separately from changing the record's Pulumi name.
It reduces the chance of confusion.
c
Okay, I'll try to see if this is it! Thank you very much for the insight :)