TA-002-P · Question #441
TA-002-P Question #441: Real Exam Question with Answer & Explanation
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
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.