{
  "slug": "terragrunt-stack-dependencies-and-autoinclude-are-enabled-by-default-da8a525d02bc",
  "title": "terragrunt stack dependencies and autoinclude are enabled by default",
  "tools": [
    "terragrunt"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-07-01T08:49:32.000Z",
  "announced_at": "2026-07-01T08:49:32.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "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.",
    "examples": [
      "unit \"vpc\" {\n  source = \"<catalog-source>/units/vpc\"\n  path   = \"vpc\"\n}\n\nunit \"app\" {\n  source = \"<catalog-source>/units/app\"\n  path   = \"app\"\n\n  autoinclude {\n    dependency \"vpc\" {\n      config_path = unit.vpc.path\n    }\n    inputs = {\n      vpc_id = dependency.vpc.outputs.vpc_id\n    }\n  }\n}",
      "include \"shared\" {\n  path = \"../shared.stack.hcl\"\n}\n\nunit \"app\" {\n  source = \"<catalog-source>/units/app\"\n  path   = \"app\"\n}"
    ],
    "gotchas": [
      "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."
    ]
  },
  "why_it_matters": "Wire units in a generated stack to their dependencies and add shared configuration to stack definitions.",
  "before": "Before stack dependencies, users defined dependency blocks in catalog units and passed dependency paths through `values`.",
  "sources": [
    "https://github.com/gruntwork-io/terragrunt/releases/tag/v1.1.0",
    "https://docs.terragrunt.com/reference/hcl/blocks/"
  ],
  "rank": 0.96047,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-17b01b515b1e067d-0:gate",
    "evidence_hash": "7dd3267c5d1eaec03235b5e3bcbc7134a244015cb580932fb05c5c6ef61add1b"
  },
  "review": {
    "draft_hash": "9e6cfa3d9f7fbfb0526bc8cd38d02d5e28951be8097a64d1dd625439fbacc9a9",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.69 (>= 0.6 needed)."
  }
}
