terraform fmt command reference | Terraform | HashiCorp Developer
The `terraform fmt` command formats Terraform configuration contents so that it matches the canonical format and style.