TERRAFORM-ASSOCIATE-003 · Question #12
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
The correct answer is C. terraform fmt -check -recursive. This command will check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes, and will return a non-zero exit code if any files need formatting. The other commands will either make changes, list the files that…
Question
Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?
Options
- Aterraform fmt -write-false
- Bterraform fmt -list -recursive
- Cterraform fmt -check -recursive
- Dterraform fmt -check
How the community answered
(28 responses)- A7% (2)
- B4% (1)
- C71% (20)
- D18% (5)
Explanation
This command will check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes, and will return a non-zero exit code if any files need formatting. The other commands will either make changes, list the files that need formatting, or not check the modules.
Topics
Community Discussion
No community discussion yet for this question.