nerdexam
HashiCorp

TA-002-P · Question #207

Which of the below command will upgrade the provider version to the latest acceptable one?

The correct answer is C. terraform init -upgrade. terraform init -upgrade upgrades all previously installed providers to the newest version that complies with the version constraints in the configuration. Without -upgrade, terraform init reuses previously downloaded providers. The other options (terraform plan upgrade, terraform

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

Question

Which of the below command will upgrade the provider version to the latest acceptable one?

Options

  • Aterraform plan upgrade
  • Bterraform provider -upgrade
  • Cterraform init -upgrade
  • Dterraform init -update

How the community answered

(41 responses)
  • A
    5% (2)
  • B
    2% (1)
  • C
    93% (38)

Explanation

terraform init -upgrade upgrades all previously installed providers to the newest version that complies with the version constraints in the configuration. Without -upgrade, terraform init reuses previously downloaded providers. The other options (terraform plan upgrade, terraform provider -upgrade, terraform init -update) are not valid Terraform commands.

Topics

#Terraform CLI#Provider management#terraform init#Upgrade providers

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice