Hey all, asking for help. We use Pulumi to test sw...
# aws
s
Hey all, asking for help. We use Pulumi to test switching from Terraform. We have two (2) environments. 3 days ago we made a Pulumi update to the second environment. Today, while checking pulumi update for the 1st environment - I saw too many updates and decided to check it. Apparently the engine wanted to replace resources from the 2nd environment on the 1st environment, which could literally destroy our cloud business. Any good advice on how to make Pulumi update only the 1st environment?
v
I have a stack for each environment, so things are really isolated
to update one env, just run
pulumi stack select myEnv
before
s
Thanks!
s
As @victorious-architect-78054 indicated, it’s best to create a separate stack for each environment. Each stack is a separate instance of a Pulumi program plus some associated configuration, and this allows you to have “identical” environments that differ only in configuration details (like different instances in testing versus production, for example). Then, when you want to perform an operation against one of the stacks, use
pulumi stack select <stack>
first, and then run your Pulumi operation.
g
A bit OT: Before moving from Terraform to Pulumi I usually advise considering the team's software engineering strengths - Pulumi requires much more software engineering experience than Terraform and an inexperienced team can easily end up with spaghetti Pulumi from nice Terrafrom. I've witnessed migrations from TF -> Pulumi and back because the team just did not have enough SWE skills to maintain the code.