nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #142

What does Terraform use the .terraform.lock.hc1 file for?

The correct answer is B. Tracking specific provider dependencies. The .terraform.lock.hcl file is a new feature in Terraform 0.14 that records the exact versions of each provider used in your configuration. This helps ensure consistent and reproducible behavior across different machines and runs.

Understand Terraform basics

Question

What does Terraform use the .terraform.lock.hc1 file for?

Options

  • AThere is no such file
  • BTracking specific provider dependencies
  • CPreventing Terraform runs from occurring
  • DStoring references to workspaces which are locked

How the community answered

(33 responses)
  • A
    15% (5)
  • B
    76% (25)
  • C
    6% (2)
  • D
    3% (1)

Explanation

The .terraform.lock.hcl file is a new feature in Terraform 0.14 that records the exact versions of each provider used in your configuration. This helps ensure consistent and reproducible behavior across different machines and runs.

Topics

#lock file#provider dependencies#version pinning#dependency locking

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice