What is the best practice for organizing stacks fo...
# aws
What is the best practice for organizing stacks for multiple regions? Some resources are region specific, some are region agnostic. What is the best practice to organize code in such cases? Any advices will be appreciated.
the answer to this will involve the details of your specific situation. it's hard to give a good answer without knowing those. as a general pattern though, group highly-related resources in the same stack. For example, if you might have a stack that contains an ingress controller and a route53 record to the ingress controller's external loadbalancer. it doesn't matter that route53 is region-agnostic. another example is if you have a single application that is distributed over multiple regions, put all those resources in the same stack. you can control the region for each resource by supplying it in the provider parameters. another one is if you have a "dev" environment and a "prod" environment, those should ideally be two separate stacks pointing to the same code, just with different parameters. It doesn't matter whether these environments are in the same region or not. does this help?
That definitely helps, thanks Mike!
p 1
In our case for AWS deployments, we have
and in the few cases where one region needs something that another does not, we'll use a conditional in the plan.
That sounds like a good practice, That way, we can rollout one region at a time to minimize the risk of global impact if something went wrong. Thanks, @millions-furniture-75402.!