TA-002-P · Question #268
What does the command terraform fmt do?
The correct answer is A. Rewrite Terraform configuration files to a canonical format and style. The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style. This command applies a subset of the Terraform language style conventions, along with other minor adjustments for readability. Other Terraform commands that generate…
Question
What does the command terraform fmt do?
Options
- ARewrite Terraform configuration files to a canonical format and style.
- BDeletes the existing configuration file.
- CUpdates the font of the configuration file to the official font supported by HashiCorp.
- DFormats the state file in order to ensure the latest state of resources can be obtained.
How the community answered
(45 responses)- A93% (42)
- B4% (2)
- C2% (1)
Explanation
The terraform fmt command is used to rewrite Terraform configuration files to a canonical format and style. This command applies a subset of the Terraform language style conventions, along with other minor adjustments for readability. Other Terraform commands that generate Terraform configuration will produce configuration files that conform to the style imposed by terraform fmt, so using this style in your own files will ensure
Topics
Community Discussion
No community discussion yet for this question.