Difference between revisions of "Terraform fmt"

From wikieduonline
Jump to navigation Jump to search
Line 27: Line 27:
 
* <code>[[terraform validate]]</code>
 
* <code>[[terraform validate]]</code>
 
* <code>[[terraform apply]]</code>
 
* <code>[[terraform apply]]</code>
 +
* [[Terraform Style Conventions]]
  
 
== See also ==
 
== See also ==

Revision as of 22:01, 27 February 2022

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

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: