https://pulumi.com logo
Title
a

adorable-account-44450

02/02/2023, 9:16 PM
Hi all, currently our team encountered a need to have “multi stage deployment” from pulumi. An example user flow is to run pulumi up first to setup initial infra, then do some development on the initial infra, and then there is a need to deploy the newly developed resources on the initial infra. The current workaround is to have flags, and manually switch them on or off. Is there a better flow (e.g. setup a separate pulumi project just for the last deployment stage)?
s

salmon-account-74572

02/02/2023, 9:32 PM
If the resources have different lifecycles (i.e., one needs to be deployed more frequently or on a different schedule than others), then I’d probably put those resources in a separate project and use stack references as needed.
r

rough-oxygen-77390

02/02/2023, 9:33 PM
What about to use 2 stacks in the same project instead of 2 different projects?
w

worried-rain-74420

02/02/2023, 9:39 PM
That’s possible too. In general I’d recommend using stacks to model different environments for your infrastructure.
a

adorable-account-44450

02/02/2023, 9:40 PM
I liked the stack reference idea, because in this case the second round of deployment is running on top of the first round of deployment, and second round runs more often too.
Thanks all for the suggestions!
s

salmon-account-74572

02/03/2023, 4:59 PM
Happy to help, let us know if we can help further!