nerdexam
HashiCorp

TA-002-P · Question #441

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

Sign in or unlock TA-002-P to reveal the answer and full explanation for question #441. The question stem and answer options stay visible for context.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

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

Options

  • Aterraform fmt -check
  • Bterraform fmt -write-false
  • Cterraform fmt "list -recursive
  • Dterraform fmt -check -recursive

Unlock TA-002-P to see the answer

You've previewed enough free TA-002-P questions. Unlock TA-002-P for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#terraform fmt#code formatting#CLI commands#modules
Full TA-002-P Practice