download_dir
unitoptional(string, "…")
Usage
The download_dir attribute sets the directory Terragrunt downloads OpenTofu/Terraform modules into. By default, Terragrunt creates a .terragrunt-cache directory next to the unit’s terragrunt.hcl:
Directoryapp
- terragrunt.hcl
Directory.terragrunt-cache/
- …
Precedence
Terragrunt uses the first of these that is set:
- The
--download-dirflag. - The
TG_DOWNLOAD_DIRenvironment variable. download_dirin the unit’sterragrunt.hcl.download_dirin a file the unit includes.
Defaults to .terragrunt-cache.
Examples
download_dir = "/tmp/terragrunt/${path_relative_to_include()}"