Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 327


When does Terraform create the .terraform.lock.hcl file?

Show Answer
Correct Answer: C

Terraform creates the .terraform.lock.hcl file after your first terraform init. This command initializes the working directory containing the Terraform configuration files and it is during this initialization process that Terraform generates the lock file to ensure consistent dependency versions.

Discussion

3 comments
Sign in to comment
Colz
Mar 10, 2024

Answer C Terraform automatically creates or updates the dependency lock file each time you run the terraform init command.

iamabhi
Mar 4, 2024

answer D is correct.

AmargcpOption: C
Sep 5, 2024

Answer C. It will be created or updated after init command is issued.