HashiCorp Certified: Terraform Associate — Question 17
You write a new Terraform configuration and immediately run terraform apply in the CLI using the local backend.
Why will the apply fail?
Answer options
- A. Terraform needs you to format your code according to best practices first
- B. Terraform needs to install the necessary plugins first
- C. The Terraform CLI needs you to log into Terraform cloud first
- D. Terraform requires you to manually run terraform plan first
Correct answer: B
Explanation
The correct answer is B because Terraform needs to install the necessary plugins to understand the resources defined in the configuration before it can apply any changes. The other options are incorrect as Terraform does not require a specific code format prior to execution, does not need a login to Terraform cloud for local operations, and does not mandate a manual terraform plan run before applying.