nerdexam
HashiCorpHashiCorp

TERRAFORM-ASSOCIATE-004 · Question #216

TERRAFORM-ASSOCIATE-004 Question #216: Real Exam Question with Answer & Explanation

The correct answer is B: Run terraform init -upgrade.. When upgrading a provider, you must run terraform init -upgrade to install the new version. This downloads the latest provider version and updates the local dependency cache. terraform refresh (A) only updates the state file but does not upgrade providers. terraform apply -upgrad

Submitted by andres_qro· Apr 18, 2026Use Terraform CLI

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 refresh.
  • BRun terraform init -upgrade.
  • CRun terraform apply -upgrade.
  • DUpgrade your version of Terraform.

Explanation

When upgrading a provider, you must run terraform init -upgrade to install the new version. This downloads the latest provider version and updates the local dependency cache. terraform refresh (A) only updates the state file but does not upgrade providers. terraform apply -upgrade (C) is not a valid command. terraform version can be upgraded separately, but (D) does not install a new provider version.

Topics

#Terraform CLI#Provider management#terraform init#Provider versions

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 PracticeBrowse All TERRAFORM-ASSOCIATE-004 Questions