TA-002-P · Question #441
To check if all code in a Terraform configuration with multiple modules is properly formatted without making changes, what command should be run?
The correct answer is D. terraform fmt -check -recursive. -check Check if the input is formatted. Exit status will be 0 if all input is properly formatted and non-zero otherwise. -recursive Also process files in subdirectories. By default, only the given directory (or current directory) is processed.
Question
To check if all code in a Terraform configuration with multiple modules is properly formatted without making changes, what command should be run?
Options
- Aterraform fmt -check
- Bterraform fmt -write-false
- Cterraform fmt "list -recursive
- Dterraform fmt -check -recursive
How the community answered
(53 responses)- A4% (2)
- B2% (1)
- C2% (1)
- D92% (49)
Explanation
-check Check if the input is formatted. Exit status will be 0 if all input is properly formatted and non-zero otherwise. -recursive Also process files in subdirectories. By default, only the given directory (or current directory) is processed.
Topics
Community Discussion
No community discussion yet for this question.