HashiCorp
TERRAFORM-ASSOCIATE-004 · Question #46
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
The correct answer is B. False. Running terraform fmt without any flags in a directory with Terraform configuration files will not check the formatting of those files without changing their contents, but will actually rewrite them to a canonical format and style. If you want to check the formatting without maki
Submitted by devops_kid· Apr 18, 2026Use Terraform CLI
Question
Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.
Options
- ATrue
- BFalse
How the community answered
(22 responses)- A14% (3)
- B86% (19)
Explanation
Running terraform fmt without any flags in a directory with Terraform configuration files will not check the formatting of those files without changing their contents, but will actually rewrite them to a canonical format and style. If you want to check the formatting without making changes, you need to use the -check flag.
Topics
#terraform fmt#CLI commands#code formatting#configuration files
Community Discussion
No community discussion yet for this question.