Exam Terraform-Associate-004 Topic 5 Question 266 Discussion
Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 266
Topic #: 5
Question #: 266
Topic #: 5
You can execute terraform fmt to standardize all Terraform configurations within the current working directory to Terraform's canonical format and style.
Suggested Answer: A Vote an answer
Detailed Explanation:
Rationale for Correct Answer:terraform fmt rewrites Terraform configuration files (.tf, and commonly .tfvars) into Terraform's canonical formatting style (indentation, alignment, spacing, etc.). By default, it formats files in the current directory (and with flags like -recursive, it can format subdirectories too).
Analysis of Incorrect Options (Distractors):
B: Incorrect because formatting is exactly what terraform fmt is designed to do.
Key Concept:Using terraform fmt to enforce consistent HCL formatting.
Reference:Read, Generate, and Modify Configurations - formatting and style standardization using terraform fmt.
Rationale for Correct Answer:terraform fmt rewrites Terraform configuration files (.tf, and commonly .tfvars) into Terraform's canonical formatting style (indentation, alignment, spacing, etc.). By default, it formats files in the current directory (and with flags like -recursive, it can format subdirectories too).
Analysis of Incorrect Options (Distractors):
B: Incorrect because formatting is exactly what terraform fmt is designed to do.
Key Concept:Using terraform fmt to enforce consistent HCL formatting.
Reference:Read, Generate, and Modify Configurations - formatting and style standardization using terraform fmt.
by Antonio at Oct 21, 2026, 02:05 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).