ExamGecko
Question list
Search
Search

Question 116 - Terraform Associate 003 discussion

Report
Export

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?

A.
Terraform will use the version recorded in your lock file
Answers
A.
Terraform will use the version recorded in your lock file
B.
Terraform will use the latest version of the provider for the new resource and the version recorded in the lock file to manage existing resources
Answers
B.
Terraform will use the latest version of the provider for the new resource and the version recorded in the lock file to manage existing resources
C.
Terraform will check your state file to determine the provider version to use
Answers
C.
Terraform will check your state file to determine the provider version to use
D.
Terraform will use the latest version of the provider available at the time you provision your new resource
Answers
D.
Terraform will use the latest version of the provider available at the time you provision your new resource
Suggested answer: A

Explanation:

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 runterraform init -upgradeto update them.

asked 18/09/2024
Chris Bezuidenhout
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first