HashiCorpHashiCorp
TA-002-P · Question #325
TA-002-P Question #325: Real Exam Question with Answer & Explanation
The correct answer is C: terraform init. The terraform init phase is where Terraform discovers, downloads, and installs the necessary provider plugins, retrieving the binary data required for providers to function.
Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)
Question
When using providers that require the retrieval of data, such as the HashiCorp Vault provider, in what phase does Terraform actually retrieve the data required?
Options
- Aterraform delete
- Bterraform plan
- Cterraform init
- Dterraform apply
Explanation
The terraform init phase is where Terraform discovers, downloads, and installs the necessary provider plugins, retrieving the binary data required for providers to function.
Common mistakes.
- A.
terraform destroyis used for tearing down infrastructure and does not involve the initial retrieval or setup of provider data or plugins. - B. While
terraform planevaluates configuration and may retrieve data fordatasources, the initial retrieval and installation of the provider plugins themselves occur during theinitphase. - D.
terraform applyexecutes the planned changes and interacts with providers, but the initial retrieval and setup of the provider plugins are completed duringinit.
Concept tested. Terraform initialization phase
Reference. https://developer.hashicorp.com/terraform/cli/commands/init
Topics
#Terraform CLI#Providers#terraform init#Provider initialization
Community Discussion
No community discussion yet for this question.