HashiCorp Certified: Terraform Associate — Question 207

Which Terraform command checks that your configuration syntax is correct?

Answer options

Correct answer: B

Explanation

The correct answer is B, as 'terraform validate' specifically checks the syntax of your configuration files without executing them. The other options serve different purposes: 'terraform fmt' formats code, 'terraform init' prepares your working directory, and 'terraform show' displays the current state and resource information.