This message was deleted.
# general
s
This message was deleted.
l
Or is there a different way to achieve what I want? I deployed into account1, which is correct. Now I want my AWS_PROFILE to point to account2, but my resources are all still in the right place. I have a provider for account1, and if I use it to look things up or create new things, it correctly deals with account1. But if I edit my code to pass in the account1 provider to my acount1 resources, Pulumi spots the difference and wants to replace everything.
g
Previews can be overly conservative when it comes to changing providers. It’s not always possible to tell if a provider change will cause replacements, so if in doubt, the preview will indicate replacements.
So yes; it’s possible, but I don’t know for sure if that’s true for your case.
l
Good tip. In the mean time, I tried groking the state file, and I think I figured it out. I exported, updated all the bits like
"provider": "urn:pulumi:mystack::vpc::pulumi:providers:aws::default_3_2_1::defaultid"
to
"provider": "urn:pulumi:mystack::vpc::pulumi:providers:aws::myprovidername::myproviderid"
, and imported. Looking very good so far...
👍 1
I also updated the profile value for the default provider, to match what I expect.
Two more days at this rate of learning and I'll have to start charging others for my services 😉
partypus 8bit 2