Global Terraform code
January 16, 2025 ยท View on GitHub
Stacks allows you to define global Terraform code that's shared across all stacks.
This can be used for use cases like defining a common Terraform state backend template (see this), or iterating through a list of regions to define multiple instances of the same provider (see this).
Global Terraform code must be located in the stacks directory like this:
|-- environments/
`-- stacks/
|-- ...
`-- global.tf # here
Any files named *.tf will work.