terraform fmt

From wikieduonline
Revision as of 06:12, 6 September 2022 by Welcome (talk | contribs)
Jump to navigation Jump to search

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

terraform fmt -diff
Usage: terraform fmt [options] [DIR]

Examples

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: