Exam Terraform-Associate-004 Topic 1 Question 222 Discussion
Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 222
Topic #: 1
Question #: 222
Topic #: 1
You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.
How will Terraform choose which version of the provider to use?
How will Terraform choose which version of the provider to use?
Suggested Answer: A Vote an answer
This is how Terraform chooses which version of the provider to use, when you add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The lock file records the exact version of each provider that was installed in your working directory, and ensures that Terraform will always use the same provider versions until you run terraform init -upgrade to update them.
by Mick at Feb 05, 2026, 08:02 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).