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

The .terraform.lock.hcl file tracks module versions.

    Correct Answer: B

    The .terraform.lock.hcl file is used to lock the versions of the provider dependencies used by your Terraform configuration. It does not track module versions. Module versions are typically tracked in the Terraform configuration files through version constraints.

Discussion
FyssyOption: B

The .terraform.lock.hcl file is not used to track module versions; it is used to lock the versions of the provider dependencies used by your Terraform configuration.

Mimi666Option: B

At present, the dependency lock file tracks only provider dependencies. Terraform does not remember version selections for remote modules, and so Terraform will always select the newest available module version that meets the specified version constraints. Fuente: https://developer.hashicorp.com/terraform/language/files/dependency-lock

Newuser95Option: B

At present, the dependency lock file tracks only provider dependencies. Terraform does not remember version selections for remote modules, and so Terraform will always select the newest available module version that meets the specified version constraints. You can use an exact version constraint to ensure that Terraform will always select the same module version. https://developer.hashicorp.com/terraform/language/files/dependency-lock

LemonadeSoftwareOption: A

A The .terraform.lock.hcl file keeps track of the specific versions of modules used in your Terraform configuration. It records the exact versions of modules and their dependencies to ensure that subsequent runs of Terraform use the same versions consistently. This file helps maintain consistency across different environments and team members working on the same Terraform project by locking the versions of modules, preventing unintentional upgrades or changes to the modules without explicit action.

dn_mohammed_dataOption: B

tracks both providers and modules versions

uax

"At present, the dependency lock file tracks only provider dependencies. Terraform does not remember version selections for remote modules, and so Terraform will always select the newest available module version that meets the specified version constraints. " https://developer.hashicorp.com/terraform/language/files/dependency-lock

gold4otasOption: B

The .terraform.lock.hcl file does not track module versions. Instead, it is used to lock the versions of the provider plugins used by Terraform. It helps ensure that the same provider versions are used consistently across different Terraform runs and by different team members. Module versions, on the other hand, are typically tracked in the versions.tf or required_version block in the main Terraform configuration file or in the root module. The versions of modules are controlled through the Terraform configuration itself, not the .terraform.lock.hcl file.

SpandropOption: A

https://developer.hashicorp.com/terraform/language/files/dependency-lock

enry99itaOption: B

At present, the dependency lock file tracks only provider dependencies. Terraform does not remember version selections for remote modules, and so Terraform will always select the newest available module version that meets the specified version constraints. You can use an exact version constraint to ensure that Terraform will always select the same module version.

PolitoMexOption: A

In the newest documentation .terraform.lock.hcl tracks both modules and providers versions.

BalaGCPArchOption: A

The question does not ask if it’s used to track only module version.. the dependency lock is used to track both provider and module version.. Hence I go with Option A

akm_1010Option: B

At present, the dependency lock file tracks only provider dependencies. Terraform does not remember version selections for remote modules https://developer.hashicorp.com/terraform/language/files/dependency-lock