Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 247 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 247
Topic #: 1
[All Terraform Associate Questions]

Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?

  • A. terraform fmt -write=false
  • B. terraform fmt -list -recursive
  • C. terraform fmt -check -recursive
  • D. terraform fmt -check
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
seifskl
Highly Voted 1 year, 4 months ago
Selected Answer: C
C. terraform fmt -check -recursive The terraform fmt -check -recursive command checks if the files are formatted according to the Terraform language style conventions. The -check option will make the command return a non-zero exit code if any of the files are not properly formatted, and the -recursive option instructs it to go into the sub-directories as well, which is useful when you have a Terraform configuration that references multiple modules.
upvoted 6 times
...
Oleg_gol
Most Recent 1 year, 6 months ago
Selected Answer: C
C. terraform fmt -check -recursive
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

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.

SaveCancel
Loading ...