thousands-knife-3009
02/21/2024, 2:45 PMsalmon-account-74572
02/21/2024, 3:01 PMpulumi stack select <stack>
based on the branch.
Or are you looking to have some sort of ephemeral stack-like functionality, where stacks are created dynamically and removed later?thousands-knife-3009
02/21/2024, 3:05 PMthousands-knife-3009
02/21/2024, 3:07 PMsalmon-account-74572
02/21/2024, 3:13 PMpulumi stack init
and set configuration values, but you will need to run pulumi stack select <stack-name>
to tell the CI job which stack you're using. Does that help?thousands-knife-3009
02/21/2024, 3:14 PMsalmon-account-74572
02/21/2024, 3:21 PMpulumi stack select <stack-name>
and set all your configuration values for the stack before you can (or should) run a Pulumi operation against the stack. That's the point of checking the stack configuration files into source control.thousands-knife-3009
02/21/2024, 3:24 PMthousands-knife-3009
02/21/2024, 3:25 PMstack select
to use a stack. I think I'm getting hung up on if I'm able to select a stack that only exists in the back-end and doesn't have a Pulumi.,<stack name>.yaml filethousands-knife-3009
02/21/2024, 3:26 PMthousands-knife-3009
02/21/2024, 3:27 PMsalmon-account-74572
02/21/2024, 3:28 PMso, the typical/expected work flow is to configure and init everything locally then commit and move the workflow over to ci/cd?I'd say so, yes.
I think I'm getting hung up on if I'm able to select a stack that only exists in the back-end and doesn't have aYou should be able to, yes. You just won't have any stack configuration values. If you haven't set any stack configuration values, then you should be good to go. If you do need stack configuration values...then you'll want to set those and commit the stack configuration file into source control. 🙂filePulumi.,<stack name>.yaml
thousands-knife-3009
02/21/2024, 3:32 PMsalmon-account-74572
02/21/2024, 3:34 PMthousands-knife-3009
02/21/2024, 4:33 PMthousands-knife-3009
02/21/2024, 5:01 PMpulumi stack select foobar --create
then delete the local Pulumi.foobar.yaml file and then run pulumi preview
thousands-knife-3009
02/21/2024, 5:02 PMthousands-knife-3009
02/21/2024, 5:28 PMpulumi config refresh
will recreate the stacks yaml file complete with the previously existing salt