Hello! I am coming from terraform land and have tw...
# general
r
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
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
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
unless you use Automation API, yeah. You can do
pulumi up -C <dir>
r
Got it, I'll look into the Automation API then. Thanks!