HashiCorp Certified: Terraform Associate — Question 118

As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?

Answer options

Correct answer: A

Explanation

The correct command is 'terraform init -upgrade', which initializes the working directory and updates the plugins to their latest versions. The other options do not serve the purpose of updating plugins: 'terraform apply' executes the changes, 'terraform refresh' updates the state file, and 'terraform providers' lists the providers without upgrading them.