Back to Terragrunt

View the contents of main.tf in the downloaded module

docs/src/data/flags/in-download-dir.mdx

1.0.3561 B
Original Source

When enabled, Terragrunt will execute the provided command in the temporary download directory where modules are cached, rather than the current working directory.

This is particularly useful when you need to:

  • Inspect downloaded module contents.
  • Execute commands against the actual module source code.
  • Debug issues with downloaded modules.

Example:

bash
# View the contents of main.tf in the downloaded module
terragrunt exec --in-download-dir -- cat main.tf

# List all files in the downloaded module
terragrunt exec --in-download-dir -- ls -la