Back to Terragrunt

Hcl Fmt Check

docs/src/data/flags/hcl-fmt-check.mdx

1.0.3348 B
Original Source

When enabled, Terragrunt will check if HCL files are properly formatted without making any changes. This is useful in CI/CD pipelines to ensure consistent formatting.

The command will:

  • Exit with status code 0 if files are properly formatted
  • Exit with status code 1 if any files need formatting

Example:

bash
terragrunt hcl fmt --check