Update dependency terragrunt to v1#481
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
bbb2b62 to
e09bba4
Compare
b58cf0b to
3d007a1
Compare
3d007a1 to
2d09d35
Compare
810e060 to
ca5bef3
Compare
ca5bef3 to
c72ec85
Compare
c72ec85 to
1bb2f4f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.99.4→1.0.8Release Notes
gruntwork-io/terragrunt (terragrunt)
v1.0.8Compare Source
🏎️ Performance Improvements
Faster read-file tracking with the
mark-many-as-readexperimentWith the
mark-many-as-readexperiment enabled, Terragrunt records every module file it marks as read during parsing. The bookkeeping for that record scaled quadratically: each new path was checked against every path recorded so far, which got expensive for units with large local module sources, and monorepos paid that cost again for every unit and every command.Recording a path now takes constant time no matter how many paths came before it, and re-marking already-recorded files is cheaper still. The
readinglists reported byfindandlistare unchanged.🐛 Bug Fixes
assume_role: preserve commas inside list expressionsTerragrunt previously failed to correctly parse
assume_roleattributes containing list values such astransitive_tag_keysorpolicy_arns. Commas inside nested list expressions were incorrectly treated as top-level separators, causing generated configurations to fail with parsing errors.This resulted in errors similar to:
Terragrunt now preserves commas inside nested list and object expressions when parsing
assume_roleblocks, allowing configurations containing array attributes to be processed correctly.Thanks to @Rahul-Kumar-prog for contributing this fix!
Completed experiments now evaluate as permanently enabled
Features gated behind a completed experiment were treated as disabled instead of permanently enabled, so functionality that graduated out of experiment status could silently stop working.
The one affected code path was
hcl validate --inputswith a git filter expression such as--filter '[HEAD~1...HEAD]': after thefilter-flagexperiment completed, the command stopped preparing git worktrees for the filter. Git filter expressions now work withhcl validate --inputsagain, matchingfind,list, and the other commands that accept filters.Exposed-include resolution errors now name the include block, file, and failing field
When resolving an
includeblock withexpose = true, Terragrunt surfaced low-level parsing or conversion errors with no indication of which include block, file, or field was at fault. This was especially hard to debug for errors that carry no source location, such as:The error is now annotated with the include block name, the included (parent) file path, and a single dotted locator for the failing field — the top-level config field (
dependency,inputs,locals, orfeature) plus the attribute path within it when go-cty can determine one:When go-cty cannot resolve a precise attribute path, the locator degrades to just the field name:
Errors that originate in HCL parsing already carry a source range (
file:line:column) and are preserved unchanged. This narrows the search from the entire configuration tree to a specific file and field.Intersecting a graph traversal with another filter no longer drops the traversed components
A graph traversal combined with an intersected filter dropped the components reached in discovery.
e.g.,
...a-dependent | type=unit(the dependents ofa-dependent, intersected with type ofunits) returned onlya-dependentitself instead of its dependents, and git-change traversals such as...[HEAD~1...HEAD] | type=unitlost the dependents of the changed units.A component that matched both a graph expression target and a positive filesystem or git filter was classified as discovered before the graph traversal ran, so the traversal never expanded from it. Terragrunt now checks graph expression targets first, so intersecting a traversal with another filter keeps the dependencies and dependents it reaches.
generateblocks now honorhcl_fmtTerragrunt now accepts
hcl_fmtongenerateblocks and preserves the setting when configurations are parsed, written, and parsed again. This lets generated.tf,.hcl, and.tofufiles opt out of automatic HCL formatting by settinghcl_fmt = false, matching the existinggenerate = { ... }attribute-map behavior.Telemetry resource now honors
OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTESTerragrunt previously hardcoded the
service.nameresource attribute toterragruntfor every emitted trace and metric, ignoring the standard OpenTelemetry environment variables. Multiple Terragrunt invocations could not be distinguished in an OpenTelemetry backend without an intermediate collector to rewrite the attribute.The resource is now composed via
resource.NewwithWithFromEnv()placed after Terragrunt's defaults, soOTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTESare honored on every span and metric. Per the OpenTelemetry specification,OTEL_SERVICE_NAMEtakes precedence over aservice.nameentry inOTEL_RESOURCE_ATTRIBUTES. The defaultservice.nameremainsterragruntwhen neither variable is set.s3::sources: support virtual-hosted-style URLss3::source URLs using the virtual-hosted-style S3 endpoint format were rejected:This resulted in errors like:
Terragrunt now accepts every AWS S3 endpoint form, including virtual-hosted-style URLs (
<bucket>.s3.<region>.amazonaws.com) and modern path-style URLs (s3.<region>.amazonaws.com).Windows console mode is restored when Terragrunt exits
On Windows, running a Terragrunt command from Nushell could leave the shell unable to read input afterward, with keystrokes such as the arrow keys appearing as raw escape sequences instead of being interpreted.
While it runs, Terragrunt reconfigures the console it shares with the parent shell so that terminal escape sequences are processed, but it did not put the original mode back when it exited. PowerShell reapplies its own console settings on every prompt and recovers on its own, so the problem surfaces only in shells that keep the inherited mode, such as Nushell. Terragrunt now records the console mode at startup and restores it on exit, returning the shell to the state it was in beforehand.
Reported in #6245.
📖 Documentation Updates
Clean Markdown is available for every docs page at
<url>.mdEvery docs page is now served as clean Markdown at the same URL with
.mdappended. For example,/getting-started/installis also available at/getting-started/install.md.The
.mdversion contains the page content without the site navigation or other surrounding HTML, which makes it well suited as context for LLMs and AI tooling: it is smaller and carries only the documentation itself. Coverage includes every page, including the CLI command reference and the changelog.This complements the existing
llms.txtandllms-full.txtfiles by providing a per-page Markdown source.🧪 Experiments Added
optional-hooks— Add experimental --no-hooks flag support for terragrunt runThe terragrunt
runcommand now supports an experimental--no-hooksflag for disabling hook execution during command runs.The feature is gated behind the
optional-hooksexperiment and skips execution ofbefore_hook,after_hook, anderror_hookblocks when enabled.This feature is currently experimental because disabling hooks changes Terragrunt execution semantics and may evolve in future releases.
Using
--no-hookswithout enabling theoptional-hooksexperiment will return an error.hook-context-envexperiment exposes additionalTG_CTX_*env vars to hooksEnable the new
hook-context-envexperiment to surface three additional environment variables to everybefore_hook,after_hook, anderror_hook:TG_CTX_HOOK_TYPE—before_hook,after_hook, orerror_hook, identifying which lifecycle phase invoked the hook.TG_CTX_SOURCE— the resolved terraform source URL (CLI--sourceoverride, else evaluatedterraform.sourcewith source-map applied, else.).TG_CTX_TERRAGRUNT_DIR— the directory of the current Terragrunt config.These variables make it easier to share a single hook script across lifecycle phases and to access the unit's source and config directory without threading them through hook arguments.
🧪 Experiments Updated
cas: fallbacks now emit telemetryWhen the
casexperiment is enabled and a CAS operation cannot complete, Terragrunt falls back to a slower path (the standard download client, or a temporary clone when the shared git store is unavailable) and keeps going. Until now the only record of a fallback was a warning in the logs, which made it impractical to measure how often CAS degrades across a fleet.Each fallback now also emits a
cas_fallbacktelemetry event whosereasonattribute identifies the cause:init_error,getter_error,git_store_unavailable,probe_failure, orstack_generation_error. Operators collecting OpenTelemetry traces or metrics from Terragrunt can count and alert on these events to judge CAS health before relying on it by default.CAS flags for the
catalogcommandThe
catalogcommand now accepts the--no-casand--cas-clone-depthflags, which were already available onrun,stack generate, andstack run. When--no-casis set, catalog repositories are cloned with plain Git even if thecasexperiment is enabled.--cas-clone-depthcontrols thegit clone --depthvalue the CAS uses when cloning catalog repositories.cas—update_source_with_casrequires a literal source stringWhen a catalog
unit,stack, orterraformblock setupdate_source_with_cas = truewith asourcethat was not a literal string, rewriting silently produced a wrong source. Interpolation such as"../units/${local.name}"had the interpolated portion dropped, leaving a bare prefix; a reference such aslocal.fooresolved to the directory containing the block itself. In both cases stack generation packaged the wrong directory without any error.Stack generation now fails with an error explaining that
update_source_with_casrequires a literal source string. Non-literal expressions, including interpolation, function calls, and references likelocal.foo, are rejected.cas— Malformedcas::references fail with a clear errorA
cas::source with a malformed hash, such ascas::sha1:a, used to fail with an opaque internal error while looking the hash up in the store.CAS references are now validated up front: the hash must be lowercase hexadecimal with exactly 40 characters for
sha1or 64 forsha256. References that don't match are rejected with an error identifying the bad reference.cas— Repositories with submodules now clone correctlyCloning a repository that contains git submodules through the Content Addressable Store failed while ingesting the repository:
A submodule appears in the repository tree as a pointer to a commit in another repository, so the object behind it cannot be read from the repository being cloned.
The CAS now fetches each submodule from the URL registered in
.gitmodulesat its pinned commit and materializes its contents in place, including nested submodules. Relative submodule URLs (such as../sibling.git) are resolved against the parent repository URL, matching git's behavior. Submodule contents are stored and deduplicated like any other content, so repeated clones reuse the cache.catalog-redesign— Failures now exit nonzero and name the sources that failedThe redesigned catalog exited with code 0 even when it failed: a session that ended on an unreachable repository, a failed scaffold, or a failed copy reported success in its exit code. Repositories that failed to load during discovery were dropped too: the warning logged for each one was drawn over by the full-screen interface, so a run where every source failed showed the same "No catalog sources were discovered" screen as a run that genuinely found nothing.
The catalog now exits nonzero when the session ends on a failure: a discovery failure that leaves nothing to browse, a failed scaffold, or a failed copy. Quitting a working session still exits 0. When some sources fail to load while others succeed, the catalog stays usable and a clean quit still exits 0; the component list shows how many sources failed, and the failed repositories are printed with their causes after the catalog closes. When every source fails, the error screen lists each failed repository instead of claiming nothing was found, and dismissing it exits nonzero.
Running
terragrunt catalogwithout an interactive terminal, such as in CI, used to fail with a raw error from the underlying TUI library:It now fails immediately with an error stating that the catalog command requires an interactive terminal.
catalog-redesign— Scaffolding a component no longer fails with a path-traversal errorScaffolding a component from the catalog (pressing
s) could fail on macOS while downloading the source:The catalog caches each repository under the system temporary directory, which macOS reports through a symlink (
/var/folders/...pointing at/private/var/folders/...). The source location Terragrunt handed to the downloader was built against the unresolved path, so it pointed outside the cached repository and was rejected.Terragrunt now resolves the temporary directory before discovering components, so the source stays inside the repository and scaffolding proceeds.
stack-dependencies: HCL tooling now handlesautoincludeTwo tooling gaps around the experimental
autoincludeblock are closed:hcl validatenow validatesautoincludeblocks. With thestack-dependenciesexperiment enabled, validating aterragrunt.stack.hclthat declaresautoincluderuns the same strict checks asterragrunt stack generate. A malformed block (for example, alocalsblock insideautoinclude) is now reported at validation time instead of passinghcl validateand only failing later during generation. Without the experiment, validation behavior is unchanged.read_terragrunt_config()can read stack-level autoinclude files. Reading a generatedterragrunt.autoinclude.stack.hclpreviously failed because the file was decoded as a unit configuration, which rejects itsunitandstackblocks. With the experiment enabled, the file is now decoded as the stack-file fragment it is, returning itsunitandstackblocks the same way reading aterragrunt.stack.hcldoes. Unit-levelterragrunt.autoinclude.hclfiles already read correctly and continue to do so.stack-dependencies:autoincludemerges like a regular includeA generated unit autoinclude (
terragrunt.autoinclude.hcl) now merges into the unit's config using the same default merge as a regularinclude, which is a shallow merge, applied uniformly across generation, full parse, and discovery. Top-level keys from the unit and the autoinclude combine, and on a conflict the autoinclude wins and replaces the unit's value rather than deep-merging nested maps;localsstay local in scope.A generated stack autoinclude (
terragrunt.autoinclude.stack.hcl) injectsunitandstackblocks into the generatedterragrunt.stack.hcl. An injected block whose name matches an existingunitorstacknow overrides that block wholesale, consistent with unit autoinclude override semantics, and an injected block with a new name is added. This applies uniformly across generation, full parse, and discovery, so a name match no longer produces a duplicate-name error. A stack autoinclude may not declare a top-leveldependencyblock (stacks have no dependencies; declare the dependency inside the target unit's own autoinclude).A
dependencyblock injected through anautoincludeis now available before a unit'sremote_stateis evaluated, so referencingdependency.<name>.outputs.<key>there no longer fails.remote_statenow behaves the same asgenerateblocks.stack-dependencies:autoincludeblocks can referencevalues.*An
autoincludeblock may now reference the stack'svalues.*. Previously avalues.*reference was rejected at stack generate time, except in a dependencyconfig_path. It now resolves to a literal likelocal.*,unit.<name>.path, andstack.<name>.path, wherever it appears:inputs,generate,remote_state,mock_outputs, andconfig_path.Function calls in an autoinclude now resolve at generate time too, in the
terragrunt.stack.hclcontext, instead of being kept verbatim and evaluated in the generated unit. Only adependency.*reference (a dependency's outputs) stays verbatim and resolves inside the unit; in a mixed expression the stack-level parts resolve and only thedependency.*reference is kept.Because functions now evaluate against the stack file rather than the unit, directory and include functions report the stack file's location:
get_terragrunt_dirreturns the stack file's directory, andpath_relative_to_includereturns".". If you relied on these resolving in the unit, move them to the unit's own configuration, or derive a per-unit value such as aremote_statebackend key fromunit.<name>.path.A
localsblock inside an autoinclude remains rejected; declare stack-level locals interragrunt.stack.hclinstead.stack-dependencies: stack dependencies resolvevalues.*in the target stack's localsExpanding a dependency that points at a generated stack directory no longer fails when that stack's
terragrunt.stack.hclreadsvalues.*in itslocalsblock. Previously,terragrunt stack generatesucceeded butterragrunt run --allthen failed withThere is no variable named "values"while expanding the dependency into its units.Dependency expansion now reads the generated
terragrunt.values.hclnext to eachterragrunt.stack.hclit visits, including nested stacks, so each nesting level resolvesvalues.*from its own values file, the same way a full stack parse does.stack-dependencies: component path references invaluesno longer break next toautoincludeblocksA
unitorstackblock'svaluescan referenceunit.<name>.pathandstack.<name>.patheven when another block in the sameterragrunt.stack.hcldeclares anautoinclude. Previously, the presence of anyautoincludeblock madestack generatereject those references withUnknown variable; There is no variable named "unit", while the same file without anautoincludegenerated fine.Pull Requests
✨ Features
🐛 Bug Fixes
OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTESenvironment variables by @Tensho in #6256terragrunt.stack.hclfiles by @yhakbar in #6291autoincludeinhcl validateand fixread_terragrunt_config()for configurations usingautoincludeby @yhakbar in #6297📖 Documentation
completedSinceby @yhakbar in #6252.mdchangelog files by @yhakbar in #6286autoincludedocumentation by @yhakbar in #6299🧹 Chores
autoincludemore flexible, supportingvalues.*by @yhakbar in #6283--no-casflag to thecatalogcommand by @yhakbar in #6292📝 Other Changes
v1.0.7Compare Source
✨ New Features
tfr://source URLs accept an optionalversionThe
versionquery parameter ontfr://source URLs is now optional. When omitted, Terragrunt queries the registry's list-versions endpoint and downloads the latest stable version, matching how OpenTofu and Terraform resolve a module reference that has no version constraint.Prereleases are excluded from resolution, so a registry that only publishes
4.0.0-rc1alongside3.3.0will pin to3.3.0. Pin a version explicitly with?version=when you need reproducible builds or want to opt into a prerelease.Thanks to @raman1236 for contributing this feature!
🐛 Bug Fixes
update_source_with_cas: preserve//subdiron a unit'sterraform.sourceWhen a unit's
terraform.sourceused the//subdir convention (for example,source = "../..//modules/foo") and opted intoupdate_source_with_cas, the rewritten source dropped the//subdirtail and the synthetic tree contained only the leaf module's files. A module that referenced a sibling via a relative path (source = "../bar") could not resolve that reference after materialization.Rewrites now preserve the original
//subdir(for example,cas::sha1:<hash>//modules/foo), and the synthetic tree is rooted at the path before//, so sibling files reachable via relative paths land in the materialized working directory.Sources without
//are unchanged: the tree stays scoped to the leaf module, and the rewritten reference has no//subdirtail.--filternow detects affected units on WindowsOn Windows,
terragrunt find --filter '[origin/main...HEAD]'(and its variants) returned no affected units even whengit diffreported changed files. Thesource=andreading=filters were affected by the same problem.Filter glob patterns are always written with forward slashes, but the affected-unit comparison was being made with Windows backslash separators, so nothing matched. Terragrunt now compares paths consistently with forward slashes on every platform, and the filter detects changed units on Windows as it already did on Linux and macOS.
Reported in #6214.
startswith,endswith,strcontains, andrun_cmdno longer panic on malformed callsCalling
startswith,endswith, orstrcontainswith the wrong number of arguments (for example a single argument instead of two) crashed Terragrunt instead of reporting a configuration error. Callingrun_cmdwith only option flags and no command (for examplerun_cmd("--terragrunt-quiet")) crashed the same way.These calls now return a clear error: a wrong-number-of-parameters error for the string functions, and an empty-command error for
run_cmd.The
--parallelismflag no longer accepts non-positive numbersPreviously, terragrunt commands that accept the --parallelism flag (or equivalently the
$TG_PARALLELISMenvironment variable) used to hang indefinitely when invoked with--parallelism=0.Terragrunt now validates that the value is positive and exits with an error otherwise.
Reported in #6211
🧪 Experiments Updated
cas— content-addressing for non-git sourcesCAS now covers module sources beyond git:
http(s), Amazon S3, Google Cloud Storage, and Mercurial. Repeat runs against an unchanged remote reuse the cached tree instead of downloading the bytes again.Before fetching, CAS issues a cheap remote probe (an HTTP
HEAD, an S3 object-attributes lookup, a GCS metadata read, orhg identify) to derive a cache key without pulling the source. On a hit, the cached tree is linked directly; on a miss, or when the remote exposes no usable signal, CAS downloads the source, ingests it, and keys the resulting tree by its content hash. A remote that publishes a new version under the same address pins to a new entry, so a stale cache cannot serve outdated bytes.cas— OpenTofu/Terraform registry sourcesModule sources of the form
tfr://...are now content-addressed in CAS. Repeat runs against the same pinned registry version reuse the cached module instead of re-downloading the archive from the registry.CAS resolves a
tfr://source by asking the registry where the underlying archive lives and uses that resolved URL as the cache key. Two runs that pin the same version share one entry; a republish under the same version pins to a new entry, so a stale cache cannot serve outdated bytes.stack-dependencies:unit.<name>.pathandstack.<name>.pathresolve invaluesThe
stack-dependenciesexperiment now exposesunit.<name>.pathandstack.<name>.pathwhen evaluating thevaluesattribute of aunitorstackblock, not only insideautoincludeblocks. A parent stack can pass the generated path of a sibling component down into a child stack, so a unit nested in that child stack can depend on a unit that lives at a different level of the hierarchy.A unit inside the
appstack readsvalues.vpc_pathand uses it as theconfig_pathof anautoincludedependency, wiring the cross-level relationship at generation time. Paths follow the same layout the generator produces, includingno_dot_terragrunt_stackon the referenced block.stack-dependencies: simplifiedunit.*/stack.*ref shapeThe
stack-dependenciesexperiment no longer resolvesstack.<name>.<unit_name>.pathorstack.<name>.<nested_stack>.path. Only the top-levelstack.<name>.pathandunit.<name>.pathforms remain.stack.<name>.nameandunit.<name>.nameare gone too; both only ever echoed the label that the reference already had to spell out.Nested references required parsing every nested catalog up front and conflicted with the reserved
nameandpathattributes on each ref: a nested unit namednameorpathcould not be addressed.To depend on a generated unit inside a stack, compute the path as
${stack.<name>.path}/<unit-relative-path>directly. The layout under a stack's generated directory followsno_dot_terragrunt_stackon the parent stack and on each unit, so hand-computed paths must mirror that resolution.stack-dependencies:.terragrunt-stack-originno longer writtenTerragrunt no longer writes the
.terragrunt-stack-originfile when generating nested stacks. Setupdate_source_with_cas = trueon yourunitandstackblocks if you would like relative paths in your catalog to resolve correctly instead.Pull Requests
✨ Features
tfr://module registry URLs by @yhakbar in #6112🐛 Bug Fixes
cas.WithFSby @yhakbar in #6195terragrunt.stack.hcl, includingautoincludeby @yhakbar in #6166terraform.sourceURLs with//by @yhakbar in #6218//by @yhakbar in #6234--parallelismvalue is positive by @ccmtaylor in #6212📖 Documentation
🧹 Chores
fatih/structsdependency by @yhakbar in #6186go-homedirdirect dependency by @yhakbar in #6184go-errorsas a dependency by @yhakbar in #6182//path test for source with CAS by @yhakbar in #6239v1.0.6Compare Source
🐛 Bug Fixes
terragruntno longer hangs whendownload_diris a non-hidden subdirectory of the unitSetting
download_dir(via the attribute,--download-dir, orTG_DOWNLOAD_DIR) to a subdirectory of the unit's working directory whose name did not start with a dot caused commands that prepare the OpenTofu or Terraform source (apply,plan,run, and similar) to hang.For example:
Here
terragrunt applywould copy./modintocache/, see the newcache/directory on the next read of the unit, and recurse into it. The default.terragrunt-cachewas unaffected because Terragrunt's source-copy step skips any directory whose name starts with a dot.These configurations now produce an immediate error identifying the source and destination paths.
mark-many-as-readexperiment now triggers during discoveryWith the
mark-many-as-readexperiment enabled, a unit whoseterraform { source = ... }pointed at a local module did not show up under--filter 'reading='filters that referenced files inside that module. Discovery would parse the unit, but the module files were never recorded as read, so the reading filter attribute could not match and the queue came back empty.The module walk now runs on the discovery code path as well, so changes to files in a local module source flow through to the units that depend on them.
terragrunt renderno longer crashes onexcludeorcatalogblocks with certain attributesRendering a config crashed with a
value has no attribute of that namepanic before any output could be produced when:excludeblock setno_run, orcatalogblock setdefault_template,no_shell, orno_hooks.These attributes are now carried through the render pipeline alongside the other fields on their respective blocks, so both blocks round-trip cleanly.
terragrunt renderno longer crashes on multipleerrors.ignoreblocks with mismatched signalsRendering a config that defined more than one
errors.ignoreblock crashed with aninconsistent list element typespanic when thesignalsmap was populated on one block and absent (or differently typed) on another. The same crash showed up in dependency-output evaluation, since both paths build the same rendered representation of the config.Each
ignoreblock is now rendered with a uniform shape. Indexed access (errors.ignore[0]), length, and iteration still work, and the signals map on each block is preserved as written.Suppress spurious
Unknown variable: dependencyerrors during dependency resolutionterragrunt planandapplyno longer printERROR Error: Unknown variable "dependency"lines when a unit pulls in a shared include (e.g. viafind_in_parent_folders) that referencesdependency.*outputs. The plans completed correctly, but the error lines cluttered CI logs.Resolves #6036.
terragrunt stackcommands no longer crash on stacks with multiple unitsRunning
terragrunt stack output(or any command that resolves concurrently parsing multiple configuration files) against a stack with several units could intermittently crash while the units were being parsed in parallel due to a race on internal bookkeeping of files read (used in the reading filter attribute).Parallel unit parsing now coordinates safely when recording which source files were read, preventing crashes.
terraform_binaryproperly respected when bothtofuandterraformare onPATHA regression in command execution caching resulted in over-caching the STDOUT result of
tofu --versionwhen bothtofuandterraformwere available onPATHandterraform_binarywas set. Early on in the execution flow, Terragrunt checks if OpenTofu is installed what its version is to determine if it supports setting of the automatic provider cache directory. This resulted in the value ofterraform_binarybeing ignored for later version checks to assess compliance withterraform_version_constraint.The version-detection cache used per run is now scoped to the binary that produced each entry, so the version recorded against an early default-binary resolution no longer leaks into the later resolution that honors
terraform_binary.🧪 Experiments Added
deep-mergeexperiment adds adeep_mergeHCL functionEnable the new
deep-mergeexperiment to use thedeep_merge(map1, map2, ...)HCL function.deep_mergerecursively merges map and object values. Later arguments override earlier arguments for overlapping keys, nested maps are merged recursively, lists are appended, andnullarguments are ignored.This is useful when composing
inputsfrom multiple decoded JSON, YAML, or HCL-derived maps:Calling
deep_mergewithout enabling thedeep-mergeexperiment returns an error.opt-out-auth— Opt out of--auth-provider-cmdduring discoveryEnable the new
opt-out-authexperiment to use--no-discovery-auth-provider-cmd(env:TG_NO_DISCOVERY_AUTH_PROVIDER_CMD), which disables the auth provider command during the discovery phase.Without the flag, Terragrunt assumes that
--auth-provider-cmdmust be run per parsed component during the discovery phase so that it can reliably resolve HCL functions such asget_aws_account_idandrun_cmd. On large repositories withrun --all --filter='reading=', this dominates wall-clock time because the auth command runs for every discovered unit rather than only the subset that will run.The
--no-discovery-auth-provider-cmdflag turns off auth invocations during discovery. The auth provider command still runs normally when running units.Units whose discovery-relevant blocks depend on credentials produced by
--auth-provider-cmdwill fail to parse with the flag set. Use it when you know that parsing will resolve successfully without any authentication done beforehand by Terragrunt.While this flag is experimental, you must also opt-in to the
opt-out-authexperiment by setting theTG_EXPERIMENTenvironment variable toopt-out-author by passing the--experiment=opt-out-authflag toterragrunt run. This flag might experience breaking changes based on community feedback for the duration of the experiment.e.g.
🧪 Experiments Updated
catalog-redesign— Interactive scaffold form onsPressing
sfrom the catalog list or detail view now opens an in-TUI form that prompts for every variable/value the selected component exposes. The form is modal: in navigate modejandk(or the arrow keys) move between fields andenterinteracts with the focused one. Required entries are flagged, and optional entries show their default in a muted style until the user opts in.enteron a text or HCL field switches the form into edit mode. Typing edits the value in place;escreturns to navigate. Only fields the user actually changes get written to the generated file, and optional defaults stay implicit, so the result is leaner than the placeholder flow.enteron a boolean field toggles between[x] trueand[ ] falsedirectly, without a separate edit mode.xon an optional field marks it "use default" again, removing any in-progress value and leaving the source's default to apply.Complex types (lists, maps, objects) accept raw HCL and are validated before the file is written, so a typo surfaces inline rather than producing a broken
terragrunt.hclorterragrunt.values.hclfile.ctrl+dfinishes the form. Required fields the user never set still write as# TODO: fill in valueso the rest of the file is usable.S(capital) keeps the previous placeholder-only flow, generating the same TODO-laden file as before for users who prefer to populate values by editing the generated file.stack-dependencies: parser tolerates HCL expressions throughoutterragrunt.stack.hclThe
stack-dependenciesexperiment now defers evaluation ofsource,path,values, andinclude.pathuntil each unit or stack block is parsed on its own. As a result,autoincluderesolution during stack generation andrun --alldiscovery no longer fall over when other parts of a stack file use Terragrunt functions,local.*, orvalues.*. A few adjacent behaviors are tightened up at the same time.Autoinclude resolves even when sibling units use expressions.
Before 1.0.6, if any unit in a stack file used a function call or a
local.*/values.*reference insource,path, orvalues, generating anautoincludeon a different unit in the same file could fail. The parser now leaves those expressions alone until they're needed, so an unrelated unit can carry anautoincludeblock without being blocked by its neighbors:includeblocks interragrunt.stack.hclaccept computed paths.The
pathattribute on anincludeblock can be an HCL expression, not just a string literal. Anautoincludeblock in the included file is resolved normally after the include merges in:What's Changed
renderWriteToby @yhakbar in #6144setup-gofrom Windows signing by @yhakbar in #6158Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.