https://pulumi.com logo
#general
Title
# general
r

rapid-raincoat-36492

09/09/2021, 12:06 AM
Hello! I am coming from terraform land and have two newbie questions: • How does pulumi handle updating many stacks at once? • How does pulumi handle updating stacks that depend on output values from other stacks? So say I have a ComponentResource that creates a website, and I have 20 stacks that use that ComponentResource. If I make a code change to that component resource and push it up to git, how do I ensure that all 20 website stacks are updated? And if those stacks have outputs that other stacks use, say each website has a DNS module that depends on it to point some domain to the site, how would I ensure that those downstream stacks are all updated? Is there any concept of dependencies between stacks on the cloud or any CI systems pulumi supports?
b

billowy-army-68599

09/09/2021, 12:10 AM
If I make a code change to that component resource and push it up to git, how do I ensure that all 20 website stacks are updated?
If you're using a local ComponentResource (ie: a local import) it would just work. If you've created a package component, you'd need to update your deps for your language (ie your package.json)
And if those stacks have outputs that other stacks use, say each website has a DNS module that depends on it to point some domain to the site, how would I ensure that those downstream stacks are all updated?
If you have a downstream stack that has changed, you'll need to run an
up
on that stack first to update the outputs. You can either: • run your
pulumi up
sequentially in your pipeline for a nice easy win (bearing in mind if there are no changes, the run won't make any changes • use the automation API to create a wrapper program/script that does the logic for you
🙌 1
r

rapid-raincoat-36492

09/09/2021, 12:27 AM
run your 
pulumi up
 sequentially in your pipeline
Just to confirm, that means that this would be a manual process running that command in each directory individually?
b

billowy-army-68599

09/09/2021, 12:33 AM
unless you use Automation API, yeah. You can do
pulumi up -C <dir>
r

rapid-raincoat-36492

09/09/2021, 1:12 AM
Got it, I'll look into the Automation API then. Thanks!