nerdexam
HashiCorpHashiCorp

TA-002-P · Question #443

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

The correct answer is B: Run terraform init -upgrade. {"question_number": 7, "question": "You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?", "correct_answer": "B", "explanation": "terraform init is the command responsible for downloading and installing

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

Question

You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?

Options

  • ARun terraform apply -upgrade
  • BRun terraform init -upgrade
  • CRun terraform refresh
  • DUpgrade your version of Terraform

Explanation

{"question_number": 7, "question": "You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?", "correct_answer": "B", "explanation": "terraform init is the command responsible for downloading and installing providers specified in your configuration. The -upgrade flag tells Terraform to upgrade providers (and modules) to the newest allowed version based on your version constraints, even if a cached version already exists in the .terraform directory. Without -upgrade, terraform init may reuse the already-downloaded version. Running terraform apply -upgrade is not a valid flag combination, terraform refresh only reconciles state, and upgrading Terraform itself is separate from upgrading providers.", "generated_by": "claude-sonnet", "llm_judge_score": 3}

Topics

#Terraform CLI#Providers#terraform init#Version Management

Community Discussion

No community discussion yet for this question.

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