Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 312


You add a new provider to your configuration and immediately run terraform apply in the CLI using the local backend. Why does the apply fail?

Show Answer
Correct Answer: D

When you add a new provider to your Terraform configuration and immediately run terraform apply, it fails because Terraform first needs to install the necessary plugins. Terraform uses providers to interact with various infrastructure platforms, and these need to be installed before any apply operation can proceed. Without the required provider plugins, Terraform cannot understand how to execute the configuration you have specified.

Discussion

2 comments
Sign in to comment
J_boyOption: D
Aug 23, 2024

Answer is D

sultazOption: D
Mar 16, 2025

When you add a new provider to your Terraform configuration and immediately run `terraform apply`, the operation fails because Terraform requires the provider plugins to be installed before any actions can be performed. This is done during the `terraform init` stage, which downloads and installs the necessary provider binaries from the registry or other source