Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 268 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 268
Topic #: 1
[All Terraform Associate Questions]

If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform init.

  • A. True
  • B. False
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
tom_cat
Highly Voted 1 year, 5 months ago
Selected Answer: B
You will get an error. You have to run terraform init -upgrade to change the version in .terraform.lock.hcl file.
upvoted 13 times
DevoteamAnalytix
1 year, 4 months ago
Correct: "Use the -upgrade option if you want Terraform to ignore the dependency lock file and consider installing newer versions." https://developer.hashicorp.com/terraform/cli/commands/init#plugin-installation
upvoted 2 times
...
shanx910
1 year ago
Wrong. The command you used is to override the lock file's current version, installing the latest version, and the version tracked in the lock file will be ignored.
upvoted 2 times
090200f
3 months, 2 weeks ago
yes me too think that true is the correct ans in this situation
upvoted 1 times
...
...
...
Mattt
Most Recent 2 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
Newuser95
9 months ago
Selected Answer: B
If a particular provider already has a selection recorded in the lock file, Terraform will always re-select that version for installation, even if a newer version has become available. You can override that behavior by adding the -upgrade option when you run terraform init, in which case Terraform will disregard the existing selections and once again select the newest available version matching the version constraint. Tested in lab
upvoted 1 times
...
shanx910
1 year ago
Selected Answer: A
Answer is A If a particular provider already has a selection recorded in the lock file, Terraform will always re-select that version for installation, even if a newer version has become available. You can override that behavior by adding the -upgrade option when you run terraform init, in which case Terraform will disregard the existing selections and once again select the newest available version matching the version constraint. https://developer.hashicorp.com/terraform/language/files/dependency-lock#dependency-installation-behavior:~:text=Terraform%20will%20always%20re%2Dselect%20that%20version%20for%20installation%2C%20even%20if%20a%20newer%20version%20has%20become%20available
upvoted 1 times
...
VSMu
1 year, 4 months ago
Selected Answer: B
While I chose B (false), the question is not clear. Reason , it will not automatically update the version with terraform init, but there is an option -upgrade that needs to be added (terraform init -upgrade). Not sure if the exam has an implicit assumption that you run `terraform init ` with -upgrade option and if so the answer would be true.
upvoted 4 times
...
March2023
1 year, 5 months ago
Selected Answer: B
I believe this is False
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

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.

SaveCancel
Loading ...