2020-04-05 21:02:58 +01:00
|
|
|
# terraform fmt
|
|
|
|
|
|
|
|
> Format configuration according to Terraform language style conventions.
|
|
|
|
> More information: <https://www.terraform.io/docs/commands/fmt.html>.
|
|
|
|
|
|
|
|
- Format the configuration in the current directory:
|
|
|
|
|
|
|
|
`terraform fmt`
|
|
|
|
|
|
|
|
- Format the configuration in the current directory and subdirectories:
|
|
|
|
|
|
|
|
`terraform fmt -recursive`
|
|
|
|
|
|
|
|
- Display diffs of formatting changes:
|
|
|
|
|
|
|
|
`terraform fmt -diff`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Do not list files that were formatted to `stdout`:
|
2020-04-05 21:02:58 +01:00
|
|
|
|
|
|
|
`terraform fmt -list=false`
|