Terragrunt von Gruntwork
v1.2.4
💡 Tips Added
read-not-tracked — Points at every file read that reading filters miss
Terragrunt does not track a file read in a part of a config it evaluates only when it runs the unit: inputs, generate, remote_state, the hooks and extra_arguments of terraform, and the inputs of a variables block. A unit with this configuration is not selected by --filter 'reading=shared/provider.tf' or by a Git filter when shared/provider.tf changes:
# terragrunt.hcl
generate "provider" {
path = "provider.tf"
if_exists = "overwrite"
contents = file("../shared/provider.tf")
}
The inputs-read-not-tracked tip pointed only at reads in inputs. The new read-not-tracked tip replaces it and points at a call to any file-reading function in any of these parts, including mark_as_read and mark_glob_as_read:
TIP (read-not-tracked): Terragrunt does not track files read in the parts of a config it evaluates only when it runs the unit, such as `inputs`, `generate`, and hooks, so reading and Git filters miss the units and stacks that read them.
Untracked file read in `generate`
--> app/terragrunt.hcl:4:15
|
4 | contents = file("../shared/provider.tf")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= Call `file` in `locals` and reference the local here.
See https://docs.terragrunt.com/features/filter/attributes#reading-based-expressions
``` …