commands.sh

terraform fmt

all

Format configuration according to Terraform language style conventions.

More info →

Examples (4)

Format the configuration in the current directory

Format the configuration in the current directory and subdirectories

terraform fmt -recursive

Display diffs of formatting changes

Do not list files that were formatted to `stdout`

terraform fmt -list=false
made by @shridhargupta | data from tldr-pages