terragrunt stack dependencies and autoinclude are enabled by default
Introduced 2026-07-01 · score 0.96
HOW TO USE IT
When a stack’s units need dependencies or shared parent-folder configuration, declare unit dependencies in `autoinclude` using generated component paths, and add an `include` block to `terragrunt.stack.hcl`. In Terragrunt v1.1.0, these features are enabled by default; no experiment flag is required.
unit "vpc" {
source = "<catalog-source>/units/vpc"
path = "vpc"
}
unit "app" {
source = "<catalog-source>/units/app"
path = "app"
autoinclude {
dependency "vpc" {
config_path = unit.vpc.path
}
inputs = {
vpc_id = dependency.vpc.outputs.vpc_id
}
}
}include "shared" {
path = "../shared.stack.hcl"
}
unit "app" {
source = "<catalog-source>/units/app"
path = "app"
}WHY THIS HELPS
Wire units in a generated stack to their dependencies and add shared configuration to stack definitions.
BEFORE THIS CHANGE
Before stack dependencies, users defined dependency blocks in catalog units and passed dependency paths through `values`.
REQUIREMENTS AND LIMITATIONS
- Version: v1.1.0
- unit.<name>.source (required): Source for the unit configuration.
- unit.<name>.path (required): Relative generated path for the unit; exposed as `unit.<name>.path` to sibling component references.
- autoinclude: Unlabeled block inside a unit or stack; its body is injected into that generated component’s configuration. It takes no arguments. For unit dependencies, declare `dependency` and `inputs` here.
- dependency "<name>".config_path (required): Path to the dependency unit or stack. It can reference a sibling’s generated path, such as `unit.vpc.path` or `stack.network.path`.
- inputs: Map of inputs; the example reads a dependency output with `dependency.vpc.outputs.vpc_id`.
- include "<label>".path (required): Path to the included stack file, relative to the directory of the stack file declaring the include. The included file may declare unit and stack blocks.
- Prerequisite: The `autoinclude` feature is for HCL `terragrunt.stack.hcl` files; JSON stack files declaring it fail generation.
- Prerequisite: In v1.1.0, the `stack-dependencies` experiment is no longer required; the release says the feature is enabled by default.
- Stack dependencies are limited to units depending on stacks; stacks cannot depend on stacks or units.
FIRST-PARTY EVIDENCE
- https://github.com/gruntwork-io/terragrunt/releases/tag/v1.1.0
- https://docs.terragrunt.com/reference/hcl/blocks/
Check the installed version and the source before using it. Entry JSON