file_pathstring
The file to record. A relative path resolves from the unit’s directory, even in an included file.
mark_as_read(file_path: string) --> stringmark_as_read records a file as read without reading it, so --queue-include-units-reading and reading= filters find the unit when the file changes. Functions that read files, such as file and read_tfvars_file, record them already. Use mark_as_read for a file that something else reads, e.g. the module or a script that run_cmd runs:
locals { policy_file = mark_as_read("${get_terragrunt_dir()}/policy.json")}
inputs = { policy_file = local.policy_file}terragrunt run --all --queue-include-units-reading policy.json -- plan now includes this unit.
To record every file that matches a glob, use mark_glob_as_read.
The file to record. A relative path resolves from the unit’s directory, even in an included file.
locals { config_path = mark_as_read("config/app.yaml") # "config/app.yaml"}