snippetbashTip
terraform fmt — Format configuration according to Terraform language style conventions. More information: <https://d
Viewed 0 times
accordingconfigurationcommandlanguageformatcliterraformterraform fmt
Problem
How to use the
terraform fmt command: Format configuration according to Terraform language style conventions. More information: <https://developer.hashicorp.com/terraform/cli/commands/fmt>.Solution
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 fmtFormat the configuration in the current directory and subdirectories:
terraform fmt -recursiveDisplay diffs of formatting changes:
terraform fmt -diffDo not list files that were formatted to
stdout:terraform fmt -list=falseCode Snippets
Format the configuration in the current directory
terraform fmtFormat the configuration in the current directory and subdirectories
terraform fmt -recursiveDisplay diffs of formatting changes
terraform fmt -diffDo not list files that were formatted to `stdout`
terraform fmt -list=falseContext
tldr-pages: common/terraform fmt
Revisions (0)
No revisions yet.