terragrunt CAS deduplicates sources and controls generated and cached content
Introduced 2026-07-01 · score 0.92
HOW TO USE IT
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.
terragrunt run --all --no-cas -- planunit "<name>" {\n source = "<relative-source>"\n path = "<stack-path>"\n update_source_with_cas = true\n}\n\nterragrunt stack generateterraform {\n source = "<source>"\n mutable = true\n}WHY THIS HELPS
Generate portable stacks from relative sources or make cached source files editable while reusing downloaded content across configurations.
BEFORE THIS CHANGE
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.
REQUIREMENTS AND LIMITATIONS
- 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.
FIRST-PARTY EVIDENCE
- 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
Check the installed version and the source before using it. Entry JSON