Is there any way to change the provider without Pu...
# general
b
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
I am going to guess direct edit of the state file 😬
b
Yeah, there are dozens of resources, so this sounds sad 🙂
s
i would guess ignore_changes would not understand the provider
b
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
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
I basically did a:
Copy code
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