You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `tests/` directory must contain a `go.mod` file for the test module.
112
113
114
+
### terragrunt hclfmt
115
+
116
+
No config file required. Terragrunt is a companion tool that runs automatically when `terragrunt.hcl` files are detected in the project. It formats Terragrunt HCL files to a canonical style.
117
+
118
+
```bash
119
+
# Check formatting (exits non-zero if files need formatting)
120
+
terragrunt hclfmt --terragrunt-check
121
+
122
+
# Apply formatting
123
+
terragrunt hclfmt
124
+
```
125
+
126
+
Projects that do not use Terragrunt are unaffected — the formatter is silently skipped when no `terragrunt.hcl` files exist.
127
+
113
128
### terraform-docs
114
129
115
130
No config file required for default operation. Generates markdown documentation from Terraform module inputs, outputs, and descriptions.
|`make test`|`cd tests && go test -v -timeout 30m`| Run terratest suite |
@@ -153,6 +170,8 @@ repos:
153
170
hooks:
154
171
- id: terraform_fmt
155
172
- id: terraform_tflint
173
+
# Uncomment if using Terragrunt:
174
+
# - id: terragrunt_fmt
156
175
```
157
176
158
177
### CI-Only (too slow for local hooks)
@@ -164,7 +183,7 @@ repos:
164
183
165
184
## Notes
166
185
167
-
- **`terraform fmt` is the only accepted formatter.** Do not use third-party HCL formatters.
186
+
-**`terraform fmt` is the only accepted formatter**for `.tf` files. Do not use third-party HCL formatters. Terragrunt HCL files (`terragrunt.hcl`) are formatted by `terragrunt hclfmt`.
168
187
-**Both `tfsec` and `checkov` run as part of `make security`.** They are complementary: tfsec focuses on Terraform-specific misconfigurations, checkov applies broader policy-as-code rules.
169
188
-**`terraform-docs` runs as part of `make docs`.** Place `<!-- BEGIN_TF_DOCS -->` / `<!-- END_TF_DOCS -->` markers in your `README.md`.
170
189
-**`terratest` tests are written in Go.** The `tests/` directory must contain a `go.mod` file.
@@ -364,6 +364,7 @@ The following table shows the default tool for each concern per language. These
364
364
- "Universal"tools run for all languages and are not language-specific overrides
365
365
- A `--` entry means the concern does not apply to that language
366
366
- Default tools are used when no per-language override is specified
367
+
- `terraform`includes Terragrunt formatting (`terragrunt hclfmt`) — no separate language entry needed. Terragrunt formatting runs automatically when `terragrunt.hcl` files are detected
0 commit comments