nerdexam
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 destroy is used for tearing down infrastructure and does not involve the initial retrieval or setup of provider data or plugins.
  • B. While terraform plan evaluates configuration and may retrieve data for data sources, the initial retrieval and installation of the provider plugins themselves occur during the init phase.
  • D. terraform apply executes the planned changes and interacts with providers, but the initial retrieval and setup of the provider plugins are completed during init.

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.

Full TA-002-P PracticeBrowse All TA-002-P Questions