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

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

    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
ColzOption: C

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

iamabhiOption: D

answer D is correct.