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 127 discussion

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

To check if all code in a Terraform configuration with multiple modules is properly formatted without making changes, what command should be run?

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

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
RVivek
Highly Voted 2 years, 2 months ago
Selected Answer: D
terraform fmt takes followong options Options: -list=false Don't list files whose formatting differs (always disabled if using STDIN) -write=false Don't write to source files (always disabled if using STDIN or -check) -diff Display diffs of formatting changes -check Check if the input is formatted. Exit status will be 0 if all input is properly formatted and non-zero otherwise. -no-color If specified, output won't contain any color. -recursive Also process files in subdirectories. By default, only the given directory (or current directory) is processed.
upvoted 12 times
...
jabbawockie12
Highly Voted 2 years, 2 months ago
Selected Answer: D
-check -recursive should check all formatting without modifying the configuration files.
upvoted 10 times
...
Anderson01
Most Recent 2 years, 1 month ago
"fmt -> without making changes" So, I will go with D (make sure)
upvoted 1 times
...
Pinky0289
2 years, 2 months ago
terraform fmt -check -recursive, recursively checks all modules and submodules for the format.
upvoted 2 times
Pinky0289
2 years, 2 months ago
The answer is C.
upvoted 1 times
ptR95
2 years, 2 months ago
The answer is D.
upvoted 2 times
...
...
...
zyxphreez
2 years, 2 months ago
Selected Answer: D
-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. answer for me is D
upvoted 5 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 ...