Skip to content

v1.2.3

🏎️ Performance Improvements

Section titled 🏎️ Performance Improvements

Faster runs and discovery with less memory

Section titled Faster runs and discovery with less memory

run --all plan takes up to 63% less time than in v1.2.2 and uses up to 18% less peak memory, measured at up to 1,000 units.

find --dependencies uses up to 89% less peak memory, measured at up to 5,000 units that share configuration through include and read_terragrunt_config, in the layout of BenchmarkDiscoverySharedConfig.

These numbers come from benchmarks on an AMD Ryzen AI Max+ 395, with a stand-in for tofu that exits immediately, so they time Terragrunt overhead alone.

Faster dependent filters from below the repository root

Section titled Faster dependent filters from below the repository root

A dependent filter, such as --filter '...vpc', is faster when Terragrunt runs from a directory below the repository root. Terragrunt searched the rest of the repository once for the target and again for each dependent it found, so the time grew with the square of the number of dependents. It now searches once.

Finding every dependent of a unit from that unit’s directory takes up to 99% less time than in v1.2.2, measured at up to 1,000 units. The same filter from the repository root takes up to 26% less time.

These numbers come from benchmarks on an AMD Ryzen AI Max+ 395.

Commands that never run OpenTofu/Terraform stop probing its version

Section titled Commands that never run OpenTofu/Terraform stop probing its version

Every command ran tofu -version at startup to set up provider caching, including the ones that never run OpenTofu/Terraform. These commands now skip that probe:

  • find
  • list
  • browse
  • dag graph
  • hcl fmt
  • hcl validate
  • catalog
  • scaffold
  • info strict
  • stack clean

They take up to 49% less time than in v1.2.2, measured at 100 units with OpenTofu 1.13.2 on an AMD Ryzen AI Max+ 395:

Command Before After
terragrunt find 43.0 ms 21.6 ms
terragrunt list 37.5 ms 20.6 ms
terragrunt hcl fmt --check 39.3 ms 21.2 ms

πŸ”’ Strict Controls Added

Section titled πŸ”’ Strict Controls Added

use-partial-parse-config-cache strict control

Section titled use-partial-parse-config-cache strict control

The --use-partial-parse-config-cache flag, and its TG_USE_PARTIAL_PARSE_CONFIG_CACHE environment variable, has no effect, because Terragrunt no longer has a partial parse cache. The flag is deprecated, and Terragrunt warns when it is set:

WARN The `--use-partial-parse-config-cache` flag is deprecated and will be removed in a future version of Terragrunt. Terragrunt no longer has a partial parse cache for it to enable, so this flag has no effect.

Remove the flag from your commands. With the new use-partial-parse-config-cache strict control enabled, passing it is an error instead:

Terminal window
terragrunt run --all --use-partial-parse-config-cache --strict-control use-partial-parse-config-cache -- plan

πŸ”’ Strict Controls Updated

Section titled πŸ”’ Strict Controls Updated

cas-source-inside-stack warnings point at the source

Section titled cas-source-inside-stack warnings point at the source

The cas-source-inside-stack warning named the unit or stack block and its source in one line:

WARN stack bar: unit "foo" in terragrunt.stack.hcl sets update_source_with_cas on source "./units/foo" inside the stack directory, so the generated stack also contains a copy of it; move the source out of the stack directory and select the stack with a // subdirectory in its source

Terragrunt now renders each warning as a diagnostic that shows the source attribute in the stack file:

WARN Source inside the stack directory
--> ../catalog/terragrunt.stack.hcl:2:28
|
2 | source = "./units/foo"
| ^^^^^^^^^^^^^
|
= Stack generation copies the directory of this stack file whole, so the
generated stack contains this unit twice, and `run --all` runs the copy
too. Move the unit directory out of the directory of this stack file, and
use `//` in the stack's source to separate the catalog from the stack
directory.

Move the stack into a subdirectory of the catalog, keep its sources outside that subdirectory, and select it with //, e.g. source = "../catalog//stacks/bar". With the strict control enabled, the error shows the same diagnostic.


auth-provider-cache β€” Reuse an auth provider command response across units

Section titled auth-provider-cache β€” Reuse an auth provider command response across units

Terragrunt runs the --auth-provider-cmd command several times for every unit, even when many units share credentials. Enable the auth-provider-cache experiment and return a cache object from the command. Terragrunt then reuses the response for every unit whose directory matches one of its globs, for ttl seconds.

{
"awsCredentials": {
"ACCESS_KEY_ID": "fake-access-key-id",
"SECRET_ACCESS_KEY": "fake-secret-access-key"
},
"cache": {
"root": "repo",
"globs": ["dev/**"],
"ttl": 900
}
}
Terminal window
terragrunt run --all --experiment auth-provider-cache --auth-provider-cmd /path/to/auth-script.sh -- plan

empty-dependency-outputs β€” Depend on a unit that has no outputs

Section titled empty-dependency-outputs β€” Depend on a unit that has no outputs

A dependency block fails with detected no outputs when its unit has no outputs, or has not been applied, and no mock_outputs apply. Enable the empty-dependency-outputs experiment to resolve dependency.<name>.outputs to an empty object in that case, so a dependency block can order a unit after one that has no outputs.

dependency "vpc" {
config_path = "../vpc"
}
Terminal window
terragrunt run --experiment empty-dependency-outputs -- plan

outputs-block β€” Declare the outputs of a unit and their mock values

Section titled outputs-block β€” Declare the outputs of a unit and their mock values

Enable the outputs-block experiment and declare the outputs of a unit, with their mock values, on the unit itself. Dependents read the mock values through their dependency blocks without setting mock_outputs.

outputs {
mock_strategy {
allowed_commands = ["validate", "plan"]
}
output "vpc_id" {
mock_value = "vpc-mock-id"
}
}
Terminal window
terragrunt run --all --experiment outputs-block -- plan

terragrunt hcl validate --outputs checks that each declared output exists in the OpenTofu/Terraform module and that dependents reference only declared outputs. Declaring the block without the experiment enabled returns an error. See the outputs block reference.

path-variable β€” Read the paths of a unit by name with the path variable

Section titled path-variable β€” Read the paths of a unit by name with the path variable

Functions such as get_terragrunt_dir() and get_parent_terragrunt_dir() return a different directory in a unit, in an included file, and in a file that read_terragrunt_config reads. Enable the path-variable experiment to read each location by name: path.unit, path.stack, path.download, path.include, and path.read.

root.hcl
remote_state {
backend = "s3"
config = {
bucket = "my-tofu-state"
key = "${trimprefix(path.unit, "${dirname(path.include)}/")}/tofu.tfstate"
region = "us-east-1"
}
}
Terminal window
terragrunt run --all --experiment path-variable -- plan

See the path variable reference.

values-block β€” Declare the values a unit or stack accepts

Section titled values-block β€” Declare the values a unit or stack accepts

Enable the values-block experiment and add a values block to a terragrunt.hcl or terragrunt.stack.hcl file to declare the values the unit or stack accepts. Each value can have a type, a default, a description, and a nullable setting. Terragrunt checks what each unit and stack block passes against these declarations. values.<name> returns the declared type, with the default applied when nothing sets the value.

values {
value "name" {
type = string
}
value "tags" {
type = map(string)
default = {}
}
}
Terminal window
terragrunt stack generate --experiment values-block

stack generate fails when a block passes a key the unit or stack doesn’t declare, a value of the wrong type, or no value for a required one:

18:10:44.033 ERROR Error: Undeclared value "tag" for unit "app"
18:10:44.033 ERROR on /path/to/live/terragrunt.stack.hcl line 7, in unit "app":
18:10:44.033 ERROR 7: tag = { team = "payments" }
18:10:44.033 ERROR The unit at ../catalog/units/app does not declare a value named "tag".
18:10:44.033 ERROR Did you mean "tags"?

terragrunt hcl validate reports each values.<name> read that the block doesn’t declare. See the values block reference.

stack generate also shows a tip, once per run, when a unit or stack without the block reads a value inside try() to fall back to a default:

18:10:44.033 INFO TIP (values-block): The unit at ../catalog/units/app reads `values.tags` inside `try()` to fall back to a default. Declare the value with a default in a `values` block instead. See https://docs.terragrunt.com/reference/hcl/blocks/values

variables-block β€” terragrunt.auto.tfvars quotes only the keys that need it

Section titled variables-block β€” terragrunt.auto.tfvars quotes only the keys that need it

terragrunt.auto.tfvars quoted every object key ("team" = "platform"). It now writes team = "platform", and quotes only a key that is not a valid identifier, e.g. "a b", or is named for.


--all commands resolve get_original_terragrunt_dir() and get_working_dir() for each unit

Section titled --all commands resolve get_original_terragrunt_dir() and get_working_dir() for each unit

With render --all, get_original_terragrunt_dir() returned the directory of the run for every unit, and get_working_dir() returned a path below the .terragrunt-cache of that directory. backend delete --all and aws-provider-patch --all had the same defect, and backend bootstrap --all had it for get_working_dir().

Both functions now return the paths of the unit, as they do in run --all. aws-provider-patch --all now patches the .terragrunt-cache of each unit, which is the directory that run --all uses.

Auto-init no longer repeats an explicit init after a source change

Section titled Auto-init no longer repeats an explicit init after a source change

When the files of a local source changed, terragrunt init ran init, and the next command, e.g. terragrunt plan, ran it again.

A source change writes a .terragrunt-init-required file that only auto-init removed. terragrunt init now removes it too, so the next command skips init. See Auto-init.

Auto-init no longer runs init before every command

Section titled Auto-init no longer runs init before every command

Auto-init ran init before every command in two kinds of unit:

  • A unit that uses no provider, e.g. one whose configuration declares only outputs. init gives such a unit no .terraform.lock.hcl and no .terraform/providers directory, and auto-init read their absence as init never having run.
  • Since v0.88.1, a unit whose root module calls no modules, when a subdirectory such as examples/ contained a module block or a comment mentioned one. Auto-init searched every .tf and .tofu file under the working directory for the text module "...". With --no-auto-init, every run warned that init was needed.

Terragrunt now runs init again only when a change affects what init does, e.g. a change to a terraform or module block, to the providers the configuration uses, to a local module it calls, or to the lock file. It reads only the files OpenTofu/Terraform load for the root module, so module calls in .tf.json and .tofu.json files, which the text search missed, now trigger init.

Terragrunt detects these changes only after an init it ran itself. If you run tofu init directly, run terragrunt init afterwards. See Auto-init.

autoinclude resolves the collection of a for expression

Section titled autoinclude resolves the collection of a for expression

In an autoinclude block, a loop variable with the name of a stack file variable, e.g. local, made terragrunt stack generate write the collection of the for expression unresolved:

names = [for local in [local.env] : "${local}-${dependency.vpc.outputs.id}"]

The generated unit failed, because local.env is not defined in it. Terragrunt now resolves the collection when it generates the stack.

The CAS no longer reads the Git config of the repository Terragrunt runs in

Section titled The CAS no longer reads the Git config of the repository Terragrunt runs in

When the CAS resolved a Git ref, it applied the local Git config of the repository Terragrunt ran in, e.g. url.<base>.insteadOf or http.extraHeader, while clones and fetches ignored it. The same source could resolve differently depending on where Terragrunt ran. It now uses only the global and system Git config.

When the CAS failed to fetch a component that sets update_source_with_cas, terragrunt stack generate copied the component without rewriting its sources. It now fails:

<component> sets update_source_with_cas, which only the CAS can rewrite, and fetching it through the CAS failed: <error>

Commands reject run flags they ignore

Section titled Commands reject run flags they ignore

render, info print, stack generate, stack output, and aws-provider-patch accepted every flag of run and ignored the ones that only apply to a run. terragrunt render --all --out-dir plans wrote no plan files, and terragrunt stack generate --report-file report.json wrote no report.

Passing one of those flags is now an error:

Terminal window
$ terragrunt render --all --out-dir plans
ERROR flag `--out-dir` is not a valid flag for `render`. Did you mean to use `run --out-dir`?

Remove the flag from the command. It had no effect.

Command Flags it stops accepting
render --source-update, --no-hooks, --no-auto-retry, --no-stack-generate, --queue-ignore-errors, --queue-ignore-dag-order
info print --no-stack-generate, --queue-ignore-errors, --queue-ignore-dag-order
stack generate --fail-fast, --no-hooks, --no-auto-retry, --queue-ignore-errors, --queue-ignore-dag-order
stack output --fail-fast, --source-update, --no-hooks, --no-auto-retry, --no-stack-generate, --queue-ignore-errors, --queue-ignore-dag-order
aws-provider-patch --no-stack-generate, --queue-ignore-errors, --queue-ignore-dag-order

All five also stop accepting --out-dir, --json-out-dir, --graph-root, --no-auto-approve, --destroy-dependencies-check, --no-destroy-dependencies-check, --disable-command-validation, --summary-disable, --summary-per-unit, --report-file, --report-format, and --report-schema-file. stack run stops accepting --graph-root, and keeps every other flag of run. aws-provider-patch also rejects any other flag it does not define, such as --graph or --json. It accepted those and dropped them.

The flags that select units, such as --queue-exclude-dir and --queue-include-dir, still work on every one of these commands.

The environment variables for these flags, such as TG_OUT_DIR, can stay set. A command reads only the variables of the flags it accepts.

--config with --all selects only files with that name

Section titled --config with --all selects only files with that name

terragrunt run --all --config main.hcl -- plan ran the units configured by a main.hcl file and also the units configured by a terragrunt.hcl file.

With --all, only files with the name you pass to --config are now unit configurations. The command above skips a directory that has a terragrunt.hcl and no main.hcl.

run --all and find read a dependency whose config_path names a file

Section titled run --all and find read a dependency whose config_path names a file

A dependency block whose config_path names a configuration file, e.g. ../shared/another-name.hcl, made run --all, find --dependencies, dag graph, and graph filters fail when the directory had no terragrunt.hcl:

You attempted to run terragrunt in a folder that does not contain a terragrunt.hcl file. Please add a terragrunt.hcl file and try again.

When the directory did have a terragrunt.hcl, those commands read it in place of the named file.

They now read the named file, and resolve the relative dependency paths in it from its directory.

Setting config_path to a file is deprecated. See the dependency-config-path-file strict control.

The depth of a dependent filter counts dependencies only

Section titled The depth of a dependent filter counts dependencies only

--filter '1...vpc' selects vpc and the units that depend on it directly. Run from a directory below the repository root, it could leave out a direct dependent in another part of the repository, because each directory Terragrunt climbed to find that dependent also used up one level of the depth.

The depth now counts only the dependencies between a unit and the target, wherever the unit is. A filter with a depth can select more units than before when dependents are outside the working directory.

--destroy-dependencies-check no longer crashes on terragrunt_version_constraint

Section titled --destroy-dependencies-check no longer crashes on terragrunt_version_constraint

Destroying a unit with --destroy-dependencies-check crashed when any unit found in the search for dependents set terragrunt_version_constraint, directly or through an include:

INFO Discovering dependent units for /repo/unit/terragrunt.hcl
panic: runtime error: invalid memory address or nil pointer dereference

The search now checks those units against the running Terragrunt version and lists the dependents before the destroy.

-detailed-exitcode no longer exits 1 for a plan error that an errors block ignores

Section titled -detailed-exitcode no longer exits 1 for a plan error that an errors block ignores

A plan -detailed-exitcode whose error matched an ignore block of the errors block exited 1 with no Terragrunt error logged, while the same run without the flag exited 0. Under run --all, that 1 replaced the exit code 2 from other units with pending changes.

A unit whose plan error is ignored now exits 0.

-detailed-exitcode no longer hides an OpenTofu/Terraform process killed by a signal

Section titled -detailed-exitcode no longer hides an OpenTofu/Terraform process killed by a signal

With -detailed-exitcode, e.g. terragrunt run -- plan -detailed-exitcode, a tofu or terraform process killed by a signal, such as by the kernel’s out-of-memory killer, made Terragrunt exit 0 with no error logged. Under run --all, the unit was reported as successful.

Terragrunt now records exit code 1 for the unit and returns the error.

Units configured with terragrunt.hcl.json are discovered

Section titled Units configured with terragrunt.hcl.json are discovered

Discovery only looked for terragrunt.hcl and terragrunt.stack.hcl, so a unit configured with a terragrunt.hcl.json file and no terragrunt.hcl was left out. find, list, run --all, and --filter skipped the unit, though running Terragrunt in its directory read the file.

Discovery now reads terragrunt.hcl.json as well, including when a Git-based filter selects units by what changed.

errors blocks match in the order they are declared

Section titled errors blocks match in the order they are declared

When two retry blocks or two ignore blocks in an errors block matched the same error, Terragrunt picked one of them arbitrarily, and picked again on every attempt. A unit whose first retry block sets max_attempts = 2 and whose broader retry blocks set max_attempts = 4 logged:

WARN Encountered retryable error: quota
Attempt 1 of 4. Waiting 0 second(s) before retrying...
ERROR max retry attempts (2) reached for error: error occurred:

The first matching block in declaration order now handles the error. Matching errors gives the order for an include with merge_strategy = "deep".

terragrunt render printed the retry and ignore blocks of a deep-merged errors block in an order that changed between runs. It now prints them in the merged order.

fileset matches patterns with ./, ../, or //

Section titled fileset matches patterns with ./, ../, or //

fileset returned an empty set for patterns such as ./resources/*.json, resources//*.json, and ../shared/*.json.

fileset now cleans the pattern the way OpenTofu does before matching.

Generated HCL quotes object keys named for

Section titled Generated HCL quotes object keys named for

A map with a key named for in the values of a unit or stack block made terragrunt stack generate write a terragrunt.values.hcl file that Terragrunt could not read:

m = {
for = "x"
zone = "y"
}
Invalid 'for' expression; For expression requires variable name after 'for'.

Terragrunt now writes the key as "for" everywhere it writes HCL, e.g. the files written by stack generate, the output of render --format hcl, and the backend file generated from a remote_state block.

A top-level values key that is not a valid identifier, e.g. "a b", made stack generate write a terragrunt.values.hcl file that could not be parsed. stack generate and hcl validate now report the key and point at it in the stack file.

Git-based filters clean up their worktrees on Windows

Section titled Git-based filters clean up their worktrees on Windows

On Windows, a command with a Git-based filter, e.g. --filter '[main...HEAD]', sometimes logged failed to cleanup worktrees with Permission denied and left a temporary worktree registered.

Terragrunt removed its temporary worktrees at the same time, and one git worktree remove could read the entry of another while Git deleted it. Terragrunt now runs them one at a time.

Graph filters that share a dependency select the same units every run

Section titled Graph filters that share a dependency select the same units every run

With two graph filters that reach the same unit at different depths, such as --filter 'web...1' --filter 'worker...' where both web and worker depend on db, Terragrunt sometimes stopped at db and left out its dependencies. Which filter reached db first decided the result, so it could change between runs.

Terragrunt now follows the dependencies of a shared unit whenever a filter has depth left there, so every run selects the same units.

hcl validate --inputs reads -var and -var-file flags split across two arguments

Section titled hcl validate --inputs reads -var and -var-file flags split across two arguments

hcl validate --inputs reported a required input as missing when extra_arguments or the command line set it with the flag and its argument separate, such as "-var", "region=us-east-1" or "-var-file", "common.tfvars".

hcl validate --inputs now reads the argument of a -var or -var-file flag from the next position, and also accepts the --var and --var-file spellings.

Run from a parent directory, hcl validate --inputs failed with no such file or directory on a relative -var-file path. The path now resolves against the directory OpenTofu/Terraform runs in, as it does during a run.

A -var flag with no NAME=VALUE, or a trailing -var or -var-file with nothing after it, now fails validation, as it fails a run.

Space-separated flag values stay next to their flag

Section titled Space-separated flag values stay next to their flag

Terragrunt moved the value of some OpenTofu and Terraform flags to the end of the command when the value was a separate argument. terragrunt plan -generate-config-out generated.tf -out plan.tfplan ran tofu plan -generate-config-out -out plan.tfplan generated.tf, which fails.

Terragrunt now keeps the value next to -backend-config, -replace, -generate-config-out and other flags that take a value. The same applies to flags set in extra_arguments.

info print reports the unit’s terraform_binary

Section titled info print reports the unit’s terraform_binary

info print ignored the terraform_binary attribute. For a unit that set terraform_binary = "/usr/local/bin/tofu", with or without --all, it printed the binary found on PATH:

"terraform_binary": "tofu"

info print now reports the binary a run of the unit calls, including one set in an included file.

Map and list inputs pass ${ and %{ through as written

Section titled Map and list inputs pass ${ and %{ through as written

A map or list in inputs is passed to OpenTofu/Terraform as JSON. A string in it that contains %{ (written %%{ in HCL, or read from a file) failed when the module declared the variable as a map, list, or object:

terragrunt.hcl
inputs = {
alert_templates = {
summary = "%%{ if firing }FIRING%%{ endif }"
}
}
Error: Invalid template control keyword

When the module declared the variable as string, or with no type, and decoded the JSON itself, every ${ in the decoded strings arrived as $${:

terragrunt.hcl
inputs = {
rule = {
summary = "Instance $${instance} is down"
}
}
main.tf
variable "rule" {
type = string
}
output "summary" {
value = jsondecode(var.rule).summary
}
summary = "Instance $${instance} is down"

Terragrunt now escapes %{ as it escapes ${ for a map, list, or object variable, and leaves both unescaped for a variable declared as string or with no type. The module receives the string as written in both cases, so the output above is Instance ${instance} is down.

render --format json prints numbers in full

Section titled render --format json prints numbers in full

render --format json rounded numbers that a 64-bit float cannot represent, with or without --write. An input of 111111111111111111 rendered as 111111111111111100, and a number outside the 64-bit float range such as 1e400 failed the render.

render --format json now prints each number in full, matching render --format hcl and the value the run passes to OpenTofu/Terraform. The output also changes for numbers it did not round. Very large and very small magnitudes print as plain digits where they printed in exponent notation (1e21 as 1000000000000000000000, 1e-7 as 0.0000001), and long fractions such as 1/3 print at full precision. Variable defaults shown by scaffold and catalog print the same way.

run --all waits on the dependencies of excluded units

Section titled run --all waits on the dependencies of excluded units

When a depends on b, b depends on c, and b is excluded from the run, run --all started a without waiting for c.

run --all now starts a only after c finishes, and a failure in c stops a. run --all destroy reverses the order. It destroys a before c, and a failure in a stops c. The same applies when b is excluded by --queue-exclude-dir, a negative --filter, or an exclude block.

Units in the run that depend on one another in a cycle through excluded units now fail with cycle detected during queue construction. Remove one of the dependencies in the cycle.

hcl validate --show-config-path --json prints [] when no configuration is invalid

Section titled hcl validate --show-config-path --json prints [] when no configuration is invalid

terragrunt hcl validate --show-config-path --json printed null when every configuration was valid, so scripts that read the output as an array failed.

It now prints an empty JSON array.

Stack files fail on a local that can never be evaluated

Section titled Stack files fail on a local that can never be evaluated

A local in a terragrunt.stack.hcl file that reads an undefined local or is part of a reference cycle was left out without an error, and the stack failed only if something read it.

Stack files now fail on such a local the way unit configuration files do:

Error: Can't evaluate expression
on terragrunt.stack.hcl line 3, in locals:
3: name = "${local.envv}-app"
The local "envv" could not be evaluated. It is either undefined, part of a reference cycle, or depends on a value that locals cannot reference.

Fix the reference or remove the local. See locals.

stack output accepts unit and stack names that start with a digit

Section titled stack output accepts unit and stack names that start with a digit

terragrunt stack output 1-vpc failed for a unit named 1-vpc, as did any address with a unit or stack name that starts with a digit:

ERROR invalid output address "1-vpc": :1,1-2: Variable name required; Must begin with a variable name.

stack output no longer requires the names in an address to be HCL identifiers, so 1-vpc, 1-vpc.id and platform.1-vpc.id return the matching outputs.

terragrunt.hcl takes precedence over terragrunt.hcl.json

Section titled terragrunt.hcl takes precedence over terragrunt.hcl.json

In a directory with both terragrunt.hcl and terragrunt.hcl.json, run --all, find, and list read terragrunt.hcl. Since v0.50.15, running the unit in that directory, reading it as a dependency, and reading it with read_terragrunt_config read terragrunt.hcl.json.

Every command now reads terragrunt.hcl from such a directory. To read terragrunt.hcl.json there, remove terragrunt.hcl, or pass terragrunt.hcl.json with --config. With --all, --config terragrunt.hcl.json also skips every directory that has no terragrunt.hcl.json.

terraform_binary and version constraints reject dependency references

Section titled terraform_binary and version constraints reject dependency references

A terraform_binary, terraform_version_constraint, or terragrunt_version_constraint that referenced a dependency output failed with There is no variable named "dependency" in run and value must be known in run --all. A reference in a conditional branch that never evaluated passed.

These attributes now reject any dependency reference with a diagnostic that points at it. hcl validate reports it too:

error: Dependency reference not allowed
--> unit/terragrunt.hcl:13:55
|
13 | terraform_version_constraint = local.use_dependency ? dependency.dep.outputs.constraint : ">= 1.0"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= The terraform_version_constraint attribute can't reference dependency
outputs, because Terragrunt checks versions before any dependency has
run.

Set these attributes from a literal, a local, or an environment variable.