v1.1.0-rc1 #6338
yhakbar
announced in
Pre-release Feedback
v1.1.0-rc1
#6338
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
✨ New Features
Stack dependencies
A stack generates a tree of units from a single
terragrunt.stack.hclfile. Wiring one of those units to another used to mean definingdependencyblocks in your catalog and threading dependency paths throughvalues. Stack dependencies let you declare those relationships up front instead.Add an
autoincludeblock inside aunitorstackblock, and Terragrunt generates a partial configuration (aterragrunt.autoinclude.hclfile) next to the generatedterragrunt.hclorterragrunt.stack.hclthat's automatically merged into the unit or stack definition. The newunit.<name>.pathandstack.<name>.pathreferences resolve to generated paths, so you don't have to hardcode them:Anything that's valid in a unit configuration is valid in its
autoincludeblock, so you can also patch catalog units with configuration they don't ship with, like retry rules:The same works for nested stacks: an
autoincludeblock inside astackblock patches the generatedterragrunt.stack.hcl, so you can, for example, add an extra unit to one environment without forking the stack in your catalog.Stack configurations also gained two capabilities along the way:
includeblocks now work interragrunt.stack.hclfiles, so shared stack configuration can live in a parent folder.dependencyblocks can target stack directories, and the run queue expands them to the units inside. Note that this relationship only goes one way: units can depend on stacks, but stacks cannot depend on stacks or units.See the stacks documentation for the full reference. Previously gated behind the
stack-dependenciesexperiment, all of this is now enabled by default.Content Addressable Store (CAS)
The Content Addressable Store (CAS) deduplicates source downloads across configurations. It addresses repositories and modules by their content, stores them locally, and serves later requests from that local store instead of repeating the fetch. This speeds up catalog cloning, OpenTofu/Terraform source fetching, and stack generation, and identical files occupy disk space once regardless of how many configurations use them.
The CAS is no longer limited to Git. It also deduplicates HTTP, Amazon S3, Google Cloud Storage, Mercurial, and SMB sources, along with OpenTofu/Terraform registry sources fetched via
tfr://. See supported sources for how each one resolves and deduplicates content.CAS is enabled by default. Use the
--no-casflag (orTG_NO_CAS=true) to opt out of it for a run:Two new attributes give you finer control, and both default to off:
update_source_with_casmakes a generated stack self-contained. Set it on aunit,stack, orterraformblock with a relativesource, andterragrunt stack generaterewrites that source into a content-addressedcas::reference, so the generated tree no longer depends on the surrounding repository layout. Catalog authors can keep relative paths in their sources and still ship a portable, reproducible stack:After
terragrunt stack generate, the relative path is replaced by a reference to the exact tree the CAS stored:mutablecontrols how the CAS places fetched content on disk. By default, the CAS hard links files from its shared store into.terragrunt-cacheand marks them read-only, which is fast and uses no extra space, but means the files can't be edited in place. Setmutable = trueon aterraformblock to copy the content instead, making the working tree safe to edit at the cost of extra I/O and disk space:Previously gated behind the
casexperiment, the CAS no longer requires--experiment cas.Redesigned
terragrunt catalogThe
catalogcommand has been redesigned. It now starts without any configuration, discovers components across your catalog repositories in the background, and streams them into the TUI as they're found.Discovery is no longer limited to a
modules/directory; components can live anywhere in a catalog repository. To control what gets discovered, add a.terragrunt-catalog-ignorefile with.gitignore-style globs for the paths you want filtered out.Components in the TUI now carry metadata to help you navigate a large catalog: each one shows a kind label (
template,stack,unit, ormodule) and optional tags defined in the front-matter of itsREADME.md. From the component list, presssto open a new screen that interactively collects the values used to scaffold the component into your repository.Previously gated behind the
catalog-redesignexperiment, the redesigned catalog is now the defaultterragrunt catalogexperience.Reading detection for local module sources
Terragrunt can select units by the files they read, which is the basis of change-based runs in CI. Previously, pointing a unit's
terraformblock at a local directory didn't mark the files inside that directory as read, so a change to the module wouldn't select the unit.When a unit's source is a local module, Terragrunt now records the module's
*.tf,*.tf.json,*.hcl,*.tofu, and*.tofu.jsonfiles as read by that unit, so--filter 'reading=<path>'and--queue-include-units-readingselect the unit when a module file changes:terragrunt run --all --filter 'reading=./modules/vpc/main.tf' -- planFor files that reading detection doesn't track on its own, the new
mark_glob_as_read()HCL function expands a glob and marks every matching file as read in one call:Existing pipelines built on
--queue-include-units-readingorreading=filters may select more units than before, because changes to local module files now count as reads. Previously gated behind themark-many-as-readexperiment, these behaviors no longer require--experiment mark-many-as-read.Skip auth during discovery with
--no-discovery-auth-provider-cmdBy default, Terragrunt runs your
--auth-provider-cmdonce for every unit it discovers, so HCL functions that need credentials resolve correctly during parsing. In a large repository, that can mean hundreds of invocations before any unit runs, which can dominate wall-clock time on change-based runs.The
--no-discovery-auth-provider-cmdflag (env:TG_NO_DISCOVERY_AUTH_PROVIDER_CMD) skips those invocations during the discovery phase, leaving auth to run only for the units that actually execute:Warning
Use this only when you know parsing resolves without credentials. Units whose configuration depends on values from
--auth-provider-cmdduring discovery (for example, viaget_aws_account_id()) will fail to parse when the flag is set.Previously gated behind the
opt-out-authexperiment, the flag now works without--experiment opt-out-auth.Run queue displayed as a dependency tree
Before a
run --all, Terragrunt lists the units it's about to run. That list now renders as a dependency tree by default instead of a flat list, with units nested under their dependencies, so the run order and the relationships between units are visible before anything executes:The header adapts to direction: dependencies come before dependents on apply, and the order reverses on destroy.
Previously gated behind the
dag-queue-displayexperiment, the tree display no longer requires--experiment dag-queue-display.🐛 Bug Fixes
Fix
permission deniedwhen generated files overwrite CAS-materialized filesWith the CAS enabled, Terragrunt fetches sources as read-only files. Writing a generated file over one of them no longer fails with
permission denied:generateblocks withif_exists = "overwrite", when the module ships the target file (for example, its ownversions.tf).terragrunt.values.hcl, when the unit or stack source already contains one.terragrunt.autoinclude.hcl, when the unit or stack source already contains one..terraform.lock.hcl, when the provider cache server updates a committed lock file duringinit -upgrade.In each case, the read-only file is replaced with a writable one, and the shared CAS store is never modified.
Resolve interpolated object keys in autoinclude blocks
terragrunt stack generatenow resolves interpolated object keys inautoincludeblocks (for example{ "${local.prefix}_key" = ... }), even when the value referencesdependency.*. Previously the generatedunit kept the key verbatim, leaking a stack-only reference that is not valid in the unit scope.
Fix panic on non-string literal interpolation in
autoincludetemplatesterragrunt stack generateno longer panics when anautoincludetemplate interpolates a non-string literal (for example"${0}"or"${true}") alongside adependency.*reference. The interpolated literal is now rendered to its string form (${0}becomes0) and the dependency reference is preserved for the unit.🧪 Experiments Updated
Six experiments completed
The following experiments graduated to general availability in this release, and the features they gated are now enabled by default:
stack-dependenciescascatalog-redesignmark-many-as-readopt-out-authdag-queue-displayEach feature is described in the New Features section above.
The corresponding
--experimentflags (andTG_EXPERIMENTvalues) are no longer needed. Passing one still works, but emits a warning about the completed experiment, so you can drop it at your convenience.Thank you to everyone who ran these experiments early and filed the feedback that got them here.
Pull Requests
🐛 Bug Fixes
📖 Documentation
--parallelismtweaking considerations better by @yhakbar in #6313v1.1.0changelog polish by @yhakbar in #6333🧹 Chores
mark-many-as-readexperiment by @yhakbar in #6310casexperiment by @yhakbar in #6254casexperiment #6254 by @yhakbar in #6324dag-queue-displayexperiment by @yhakbar in #6320opt-out-authexperiment by @yhakbar in #6321go-gitby @yhakbar in #6325go-git#6325 feedback by @yhakbar in #6335This discussion was created from the release v1.1.0-rc1.
Beta Was this translation helpful? Give feedback.
All reactions