Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are there two "prod" folders in the directory tree? #54

Closed
trallnag opened this issue Feb 12, 2021 · 3 comments
Closed

Why are there two "prod" folders in the directory tree? #54

trallnag opened this issue Feb 12, 2021 · 3 comments

Comments

@trallnag
Copy link

Looking at the directory tree I am seeing two "prod" dirs on two different levels? What is the reason for this layout?

image

@bwhaley
Copy link

bwhaley commented Feb 12, 2021

The top level prod represents an AWS account called "prod". It contains all the configurations for the prod AWS account in all regions. The nested prod represents a VPC called "prod" in the us-east-1 region. It contains all the configuration for resources in the prod account, us-east-1 region, prod VPC.

The reasoning behind this layout is that you can have fine-grained control over what configurations are applied. For example, you could run terragrunt run-all apply (formerly terragrunt apply-all) at the prod/us-east-1/prod level to apply only the configurations in the prod vpc, us-east-1 region, prod account. Or, you could run the same command but at the prod/us-east-1 level to apply all the configurations for the prod account, us-east-1 region. You can think of it as a hierarchy that allows you to have control over what configurations are applied at any given time.

@trallnag
Copy link
Author

@bwhaley, makes sense. Thanks for the explanation. I guess in my use case I just don't need such a layout because I use the Terragrunt live repository for a single product / project only and I know from the start that I only need a single region and VPC (per environment like prod, QA, and dev.

@bwhaley
Copy link

bwhaley commented Feb 12, 2021

There are infinite ways to approach the layout so feel free to experiment! We're toying with another approach ourselves as outlined here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants