Outputs a JSON object with contextual information such as the configuration file path, current working directory, cache download location, IAM role (if any), the binary used to run OpenTofu/Terraform, and the command being executed.
Examples
Print out information about the current context of Terragrunt.
Terminal window
$terragruntinfoprint
{
"config_path":"/example/path/terragrunt.hcl",
"download_dir":"/example/path/.terragrunt-cache",
"iam_role":"",
"terraform_binary":"tofu",
"terraform_command":"print",
"working_dir":"/example/path"
}
With --all, each unit is written on one line, so the output is JSON Lines and a reader can take it a line at a time. Each unit reports the context run --all gives it, including the download_dir it caches into:
Print the context of every unit discovered from the current working directory.
Print the context of every unit discovered from the current working directory, one JSON document per line.
Terminal window
terragruntinfoprint--all
Aliases:
a
Environment Variables:
TG_ALL
--filteroptional(list(string))
Print the context of only the units that match a filter query
Print the context of only the units that match the filter query. Passing --filter turns on --all.
Terminal window
terragruntinfoprint--filter'./prod/**'
Environment Variables:
TG_FILTER
--filter-affectedoptional(bool)
Print the context of only the units affected by changes between the default branch and HEAD
Print the context of only the units modified, added, or removed between the default branch and HEAD. Equivalent to --filter '[main...HEAD]', with your repository’s default branch in place of main. Combine it with --all.
Directory that encloses graph discovery for filters, instead of the git repository root
Replace the git repository root as the outer limit for filter expressions that traverse the dependency graph. info print does not print a unit that traversal reaches outside the boundary.