--json
Output the result in JSON format.
When enabled, Terragrunt will output the validation results in JSON format, making it easier to parse and process programmatically.
Example:
terragrunt hcl validate --json
Environment Variables:
TG_JSON
Recursively find HashiCorp Configuration Language (HCL) files and validate them.
Discover all HCL files in the current directory, and validate them.
terragrunt hcl validate
--json
Output the result in JSON format.
When enabled, Terragrunt will output the validation results in JSON format, making it easier to parse and process programmatically.
Example:
terragrunt hcl validate --json
Environment Variables:
TG_JSON
--show-config-path
Show a list of files with invalid configuration.
When enabled, Terragrunt will display the full paths of files that contain invalid HCL configurations. This is particularly useful when validating multiple files to quickly identify which files need attention.
Example:
terragrunt hcl validate --show-config-path
Environment Variables:
TG_SHOW_CONFIG_PATH
--inputs
Validate that all variables are set by the module a unit provisions.
When enabled, Terragrunt will validate that all variables are set by the module a unit provisions.
Example:
terragrunt hcl validate --inputs
Environment Variables:
TG_INPUTS
--strict
Throw an error if any inputs are set that are not defined in the module that a unit provisions.
When enabled, Terragrunt will throw an error if any inputs are set that are not defined in the module that a unit provisions.
Example:
terragrunt hcl validate --inputs --strict
Environment Variables:
TG_STRICT