ExamGecko
Question list
Search
Search

Question 106 - Terraform Associate 003 discussion

Report
Export

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
Answers
A.
terraform fmt -write-false
B.
terraform fmt -list -recursive
Answers
B.
terraform fmt -list -recursive
C.
terraform fmt -check -recursive
Answers
C.
terraform fmt -check -recursive
D.
terraform fmt -check
Answers
D.
terraform fmt -check
Suggested answer: C

Explanation:

This command will check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes, and will return a non-zero exit code if any files need formatting. The other commands will either make changes, list the files that need formatting, or not check the modules.

asked 18/09/2024
Diego Beltran
53 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first