HashiCorp Certified: Terraform Associate — Question 166

If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform init.

Answer options

Correct answer: B

Explanation

The correct answer is B because Terraform only updates the lock file when you run 'terraform init' without any changes to the configuration. If you change the version constraint, the lock file remains unchanged until you explicitly run 'terraform get' or another command that modifies the dependencies.