mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
584 B
Plaintext
26 lines
584 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# terraform fmt
|
|
|
|
> Format configuration according to Terraform language style conventions.
|
|
> More information: <https://developer.hashicorp.com/terraform/cli/commands/fmt>.
|
|
|
|
- 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`
|
|
|
|
- Do not list files that were formatted to `stdout`:
|
|
|
|
`terraform fmt -list=false`
|