This message was deleted.
# aws
s
This message was deleted.
b
You could encapsulate your entire stack into a
ComponentResource
and then instead declare 1 of those for each region at the top of your stack. This would allow you to have a single
Production
stack. Or just do separate stack configs
Hell you could encapsulate you entire stack into a
ComponentResource
as I mentioned, and then you could have your config contain a list of regions to deploy into. Then your
Stack
code could loop on those and declare an instance of your
ComponentResource
for each of them. That way your
Staging
stack which might only need 1 region could just be a config change
c
I’m thinking separate stack configs is the way to go
g
This is a tricky question because it's highly dependent on an environment and your requirements for the "agility" of your resources. If your solution is using just 2 regions and will do for a long time. Then Stack per region is good. You can also make use of namespaces in config and have 1 stack for both regions like Joshua suggested.
Pulumi.production.yaml
Copy code
us-region:config_key:  value

eu-region:config_key: value
then in code:
Copy code
us_config = pulumi.Config('us-region')
eu-config = pulumi.Config('eu-region')
b
Yea I personally wouldn’t want multiple stacks per region. I’m just imagining stacks going out of sync because now you need to deploy multiple times per environment per release