docs/src/data/changelog/v1.0.4/stack-autoinclude-filename-split.mdx
stack-dependencies - Separate filenames for unit vs stack autoincludesGenerated autoinclude files now use distinct filenames depending on the component kind, so tooling (LSP, read_terragrunt_config(), indexers) can identify a file's purpose from its name alone:
terragrunt.autoinclude.hcl.stack { ... }) are now written as terragrunt.autoinclude.stack.hcl. The .stack.hcl suffix mirrors terragrunt.stack.hcl, matching the convention used elsewhere for stack files.# terragrunt.stack.hcl
unit "app" {
source = "../catalog/units/app"
path = "app"
autoinclude {
# Generated as: .terragrunt-stack/app/terragrunt.autoinclude.hcl
dependency "vpc" { config_path = unit.vpc.path }
}
}
stack "networking" {
source = "../catalog/stacks/networking"
path = "networking"
autoinclude {
# Generated as: .terragrunt-stack/networking/terragrunt.autoinclude.stack.hcl
dependency "shared" { config_path = unit.shared.path }
}
}
This change implements the naming convention proposed in the Stack Dependencies RFC so configurations for units and stacks always live in files whose names clearly indicate their purpose.
To learn more, see the experiment documentation.