We assume you have followed Stacks' installation instructions.
All stacks have the following structure:
|-- environments/
`-- stacks/
`-- vpc/
|-- base/
| |-- backend.tf
| `-- main.tf
|-- layers/
| |-- development/
| | `-- layer.tfvars
| `-- production/
| `-- layer.tfvars
`-- stack.tfvars
Here's what you need to know:
vpc
is the stack name.base
is where the stack's Terraform root module is located.- Variables in the stack's
*.tfvars
files are injected on all layers. - Variables in the layers'
*.tfvars
files override those of the stack's*.tfvars
files.
With that in mind:
- If you want to modify the infrastructure in all layers, change the stack's base to your liking.
- If you want to modify the infrastructure in one or a subset of layers, change the stack's base to support different templating based on a common variable with different value between layers on one side and the other.
- If you want to modify the variable values of all layers, change the stack's
*.tfvars
files` (make sure they aren't being overriden at the layer level). - If you want to modify the variable value of one or a subset of layers, change the layers'
*.tfvars
files.