Difference between revisions of "Terraform fmt"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
* https://www.terraform.io/docs/cli/commands/fmt.html  
+
<code>terraform fmt</code> command is used to rewrite Terraform configuration files to a canonical format and style.
 +
* * https://www.terraform.io/docs/cli/commands/fmt.html  
  
The <code>terraform fmt</code> command is used to rewrite Terraform configuration files to a canonical format and style.
+
terraform fmt -diff
  
 
Usage: <code>terraform fmt [options] [DIR]</code>
 
Usage: <code>terraform fmt [options] [DIR]</code>

Revision as of 06:11, 6 September 2022

terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style.

terraform fmt -diff

Usage: terraform fmt [options] [DIR]

terraform fmt
(no output)
terraform fmt
main.tf
terraform fmt 
main.tf
variables.tf
(no output)
  • -diff - Display diffs of formatting changes

Related commands

See also

Advertising: