https://pulumi.com logo
Title
b

bored-table-20691

01/27/2022, 6:47 PM
Is there any way to change the provider without Pulumi wanting to do a replace? Specifically, I am changing from the default AWS provider to an explicit one (configured with all the same values), but running
pulumi up
wants to do a wholesale replace (of VPCs, EKS cluster, etc), which would be very sad.
😬 1
s

stale-vase-87890

01/27/2022, 7:22 PM
I am going to guess direct edit of the state file 😬
b

bored-table-20691

01/27/2022, 7:23 PM
Yeah, there are dozens of resources, so this sounds sad 🙂
s

stale-vase-87890

01/27/2022, 7:24 PM
i would guess ignore_changes would not understand the provider
b

bored-table-20691

01/27/2022, 7:27 PM
Looking at the state file, it may not be an end of the world search and replace
Sadly editing the state file does not seem to have a desired effect - updating the provider URN seems to just be ignored when I import it.
s

stale-vase-87890

01/27/2022, 7:58 PM
oh dear 😞
I know with TF I had to bump the serial number when ever I edited the state file, not sure if that is a thing for pulumi
b

bored-table-20691

01/27/2022, 8:00 PM
I basically did a:
pulumi stack export > stack.json

changed every reference from

"provider": "urn:pulumi:prod-us-west-1::okera-infra-regions::pulumi:providers:aws::default::76de2844-2af4-4a17-9d02-1366c5510b58",

to

"provider": "urn:pulumi:prod-us-west-1::okera-infra-regions::pulumi:providers:aws::main-aws-provider::c7930319-df74-40a8-b13a-cb41e63be893",

pulumi stack import --file stack.json