TERRAFORM-ASSOCIATE-004 · Question #95
Which of these commands makes your code more human readable?
The correct answer is D. Terraform fmt. terraform fmt (format) automatically reformats Terraform configuration files to follow the canonical HCL style conventions - consistent indentation, spacing, and alignment. This makes code more readable and consistent across teams. Option A (terraform validate) checks for configu
Question
Options
- ATerraform validate
- BTerraform output
- CTerraform show
- DTerraform fmt
How the community answered
(24 responses)- A8% (2)
- C4% (1)
- D88% (21)
Explanation
terraform fmt (format) automatically reformats Terraform configuration files to follow the canonical HCL style conventions - consistent indentation, spacing, and alignment. This makes code more readable and consistent across teams. Option A (terraform validate) checks for configuration errors but does not change formatting. Option B (terraform output) displays output values from state. Option C (terraform show) displays the current state or a saved plan in human-readable form, but does not modify source code formatting.
Topics
Community Discussion
No community discussion yet for this question.