nerdexam
HashiCorpHashiCorp

TA-002-P · Question #345

TA-002-P Question #345: Real Exam Question with Answer & Explanation

The correct answer is B: Validates all required variables are present. The terraform init command prepares a Terraform working directory by downloading providers and modules and initializing the backend, but it does not validate that all required variables are present.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

Which task does teraform init not perform?

Options

  • ASources any modules and copies the configuration locally
  • BValidates all required variables are present
  • CConnects to the backend
  • DSources all providers present in the configuration and ensures they are downloaded and available

Explanation

The terraform init command prepares a Terraform working directory by downloading providers and modules and initializing the backend, but it does not validate that all required variables are present.

Common mistakes.

  • A. terraform init downloads and copies modules used in the configuration, making them available for use.
  • C. terraform init establishes the connection to the configured backend, which is essential for state management and collaboration.
  • D. terraform init discovers and downloads the necessary provider plugins specified in the configuration, ensuring they are available for resource management.

Concept tested. Terraform init command functionalities

Reference. https://developer.hashicorp.com/terraform/cli/commands/init

Topics

#terraform init#CLI commands#providers#modules

Community Discussion

No community discussion yet for this question.

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