Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 262


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

Show Answer
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

11 comments
Sign in to comment
FyssyOption: B
Dec 18, 2023

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
Mar 26, 2024

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
Aug 20, 2024

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

dn_mohammed_dataOption: B
Mar 26, 2024

tracks both providers and modules versions

Anonymous
Apr 28, 2024

"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

LemonadeSoftware
May 16, 2024

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.

gold4otasOption: B
Jun 30, 2024

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.

akm_1010Option: B
Feb 15, 2024

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

BalaGCPArchOption: A
Feb 26, 2024

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

PolitoMexOption: A
Jun 1, 2024

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

enry99itaOption: B
Jun 11, 2024

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.

SpandropOption: A
Jun 14, 2024

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