Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 123

What does Terraform use .terraform.lock.hcl file for?

    Correct Answer: A

    The .terraform.lock.hcl file is used to track provider dependencies. This file is automatically generated by Terraform when you run terraform init and it locks the versions of the providers used in your configuration. This ensures that subsequent Terraform runs use the same provider versions, providing consistency and reproducibility across different environments. This file should be included in your version control system to maintain consistency across team members and environments.

Discussion
[Removed]Option: A

A is correct https://www.terraform.io/language/files/dependency-lock

NunyabiznesOption: A

A. Tracking provider dependencies The .terraform.lock.hcl file is used to track provider dependencies and their exact versions. This file is automatically generated by Terraform when you run terraform init. It locks the versions of the providers used in your configuration, ensuring that subsequent Terraform runs use the same provider versions for consistency and reproducibility across environments. This file should be committed to your version control system to maintain consistency across team members and environments.

bora4motionOption: A

so if you google the first thing that shows up is A

BurakkoOption: A

I guess it is A. "hcl , and this name is intended to signify that it is a lock file for various items that Terraform caches in the . terraform subdirectory of your working directory. Terraform automatically creates or updates the dependency lock file each time you run the terraform init command."

PikopoOption: A

A is correct

Ni33Option: A

A is the correct answer !

LivvieOption: A

The right answer is A. Based on this reference: https://developer.hashicorp.com/terraform/language/files/dependency-lock

Anderson01Option: A

"Terraform has made some changes to the "provider dependency" selections recorded in the .terraform.lock.hcl file. Review those changes and commit them to your version control system if they represent changes you intended to make." -> I will go with A

Atta33Option: A

A is correct

shopkittyOption: D

I voted for D, this file for the purpose that now allow other user to perform init again the from different machine (workspace) if you work as a team.