https://pulumi.com logo
#general
Title
# general
v

victorious-cat-95191

12/22/2021, 4:40 PM
Hi all, I'm upgrading from v3.5.0 to v4.1.0 of the Cloudflare provider (https://www.pulumi.com/registry/packages/cloudflare/). This is resulting in a bunch of replacements because the resource URN changes:
[provider: urn:pulumi:cloudflare-dns-secondary-domains::cloudflare-dns-secondary-domains::pulumi:providers:cloudflare::default_3_0_0::3a22f721-09b3-4061-965f-6d1a97f600f4 => urn:pulumi:cloudflare-dns-secondary-domains::cloudflare-d urn:pulumi:cloudflare-dns-secondary-domains::cloudflare-dns-secondary-domains::pulumi:providers:cloudflare::default_4_0_0::output<string>]
Is this expected behaviour (because there's a breaking change in the upstream TF provider)? What's the best way of dealing with this?
p

prehistoric-activity-61023

12/22/2021, 5:58 PM
if you see updates to provider resource only, that’s the expected behavior
actually, let me take a look into that, I think I’m gonna have the same upgrade in one of my projects
In my case, it wants to create replacements for each Record resource, too. Although the only change is additional
allowOverwrite
property set to
false
🤔 . I’ve found the following GH issue: https://github.com/pulumi/pulumi-cloudflare/issues/186
In my case, the URN of the provider doesn’t change (although its version is altered but that’s understandable). @victorious-cat-95191 Do you use default provider configuration or do you create an explicit provider instance within pulumi code?
(it should not affect the discussed case but I want to know if your case is related to #186 or it’s something else and should be reported separately)
v

victorious-cat-95191

12/22/2021, 8:31 PM
@prehistoric-activity-61023 It's trying to replace all of the Record resources (sorry, I wasn't clear). I'm using the default provider configuration. Looks like that Github issue is relevant.
b

billowy-army-68599

12/22/2021, 9:14 PM
@victorious-cat-95191 if it's just the urn changing, you might be able to use aliases to stop the replacement
v

victorious-cat-95191

12/23/2021, 10:14 AM
@billowy-army-68599 Thanks. I've had a quick look at that and it doesn't work. The Record resource URN doesn't change so adding an alias there doesn't help. It's the URN for the provider within the record resource that causes the Record to be replaced. I guess I'll have to wait for progress on that GIthub issue before I can upgrade.
I manually modified the stack to change the provider to the new version and Pulumi was still trying to replace the Record resources so it looks like it might be to do with the additional `allowOverwrite`property? 🤷‍♂️
p

prehistoric-activity-61023

12/23/2021, 2:01 PM
I tried to do some “hacks” on my part as well with no success. I’d need to look deeper how the plugin code works and why it forces the replacement instead of update (so the additional property
allowOverwrite
is saved with default value).
I’m afraid it might be related to the way TF plugin works because I noticed that this plugin is ported from terraform. Still, right now, I cannot help more. If I were you, I’d stick to v3 for now and wait until the GH issue is resolved.
v

victorious-cat-95191

12/23/2021, 5:03 PM
Indeed. I'm also struggling to reconcile the changes from this breaking change in the TF provider "resource/cloudflare_record: 
data
 is now a 
TypeList
 instead of a `TypeMap`" (https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/CHANGELOG.md#300-september-20th-2021) so happy to stay at v3 for now.
3 Views