{
  "slug": "terragrunt-cas-deduplicates-sources-and-controls-generated-and-cached-content-b102e36ebf82",
  "title": "terragrunt CAS deduplicates sources and controls generated and cached content",
  "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 generating stacks from a catalog with relative source paths, set `update_source_with_cas = true` on the relevant `unit`, `stack`, or `terraform` block; `terragrunt stack generate` rewrites the path to a CAS reference. To edit fetched CAS content in `.terragrunt-cache`, set `mutable = true` on the applicable block; otherwise CAS materializes content read-only.",
    "examples": [
      "terragrunt run --all --no-cas -- plan",
      "unit \"<name>\" {\\n  source = \"<relative-source>\"\\n  path = \"<stack-path>\"\\n  update_source_with_cas = true\\n}\\n\\nterragrunt stack generate",
      "terraform {\\n  source = \"<source>\"\\n  mutable = true\\n}"
    ],
    "gotchas": [
      "Version: v1.1.0",
      "--no-cas: Disables CAS for the run; incompatible with `update_source_with_cas = true`.",
      "TG_NO_CAS: Set to `true` to opt out of CAS for a run, as stated in the v1.1.0 release note.",
      "update_source_with_cas: On a `unit`, `stack`, or `terraform` block, rewrites a relative literal source to a CAS reference during stack generation; requires CAS enabled.",
      "mutable: On a `terraform` block, copies CAS-fetched content into an editable working tree. Defaults to `false`; takes effect only for CAS-fetched sources.",
      "source (required): The source to fetch. For `update_source_with_cas`, it must be a relative literal string; interpolation, function calls, and references cause stack generation to fail.",
      "Prerequisite: The card’s relative-source stack-generation task requires Terragrunt 1.1 or newer.",
      "`update_source_with_cas` applies to relative sources on a `unit`, `stack`, or `terraform` block.",
      "`mutable = true` uses extra I/O and disk space; default CAS hard links are read-only."
    ]
  },
  "why_it_matters": "Generate portable stacks from relative sources or make cached source files editable while reusing downloaded content across configurations.",
  "before": "Before Terragrunt 1.1, catalog units used remote Git URLs with a `?ref=` even for modules in the same repository; plain relative paths did not resolve from generated locations.",
  "sources": [
    "https://github.com/gruntwork-io/terragrunt/releases/tag/v1.1.0",
    "https://docs.terragrunt.com/features/caching/cas/",
    "https://docs.terragrunt.com/reference/hcl/blocks/",
    "https://github.com/gruntwork-io/terragrunt-infrastructure-catalog-example/blob/main/docs/1.1-migration-guide.md"
  ],
  "rank": 0.92053,
  "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-1:gate",
    "evidence_hash": "7dd3267c5d1eaec03235b5e3bcbc7134a244015cb580932fb05c5c6ef61add1b"
  },
  "review": {
    "draft_hash": "55a3258728286f6fb9d691840d269c28fd76ea68efc1fa398a48c3581be2e1e2",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "2 of 3 judge runs approved with p_yes >= 0.9 (mean 0.92 >= 0.9; 2 needed) and Jev gave 0.74 (>= 0.6 needed)."
  }
}
