Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Exam Terraform-Associate-003 Topic 6 Question 15 Discussion

Actual exam question for HashiCorp's Terraform-Associate-003 exam
Question #: 15
Topic #: 6
[All Terraform-Associate-003 Questions]

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

Show Suggested Answer Hide Answer
Suggested Answer: C

Terraform creates the .terraform.lock.hcl file after the first terraform init command. This lock file ensures that the dependencies for your project are consistent across different runs by locking the versions of the providers and modules used.


Contribute your Thoughts:

Carlee
10 months ago
Option C, duh. The .terraform.lock.hc1 file is Terraform's way of keeping track of your dependencies. It's like a digital leash for your infrastructure.
upvoted 0 times
...
Starr
10 months ago
Hmm, I think it's B, after the first terraform apply. But then again, I might have terraform-ed one too many times today. *laughs*
upvoted 0 times
Temeka
9 months ago
No, I'm pretty sure it's D, when you enable state locking.
upvoted 0 times
...
Yuonne
9 months ago
I think it's C, after the first terraform init.
upvoted 0 times
...
...
Kristine
10 months ago
I remember learning this in the Terraform documentation. It's option C, after the first terraform init. Always trust the docs, my friends.
upvoted 0 times
Mammie
10 months ago
I always make sure to check the docs before diving into something new.
upvoted 0 times
...
Herminia
10 months ago
That's right, the documentation is always a good source of information.
upvoted 0 times
...
Gracia
10 months ago
Option C) After your first terraform init
upvoted 0 times
...
...
Eliseo
10 months ago
Definitely C. After the first terraform init. It's like Terraform's way of saying 'Here, hold this for me.'
upvoted 0 times
Joseph
10 months ago
I always make sure to run terraform init first to avoid any issues with the lock file.
upvoted 0 times
...
Oretha
10 months ago
Yeah, that makes sense. Terraform needs to set up everything before creating the lock file.
upvoted 0 times
...
Lavonda
10 months ago
I agree, it's definitely C. After the first terraform init.
upvoted 0 times
...
...
Lang
11 months ago
I'm pretty sure it's after the first terraform init, but I'm not 100% sure. Gotta love those random Terraform files, am I right?
upvoted 0 times
Laurena
9 months ago
I think it's after the first terraform init too. Those Terraform files can be confusing sometimes.
upvoted 0 times
...
Kate
10 months ago
D) When you enable state locking
upvoted 0 times
...
Mignon
10 months ago
C) After your first terraform init
upvoted 0 times
...
Tran
10 months ago
B) After your first terraform apply
upvoted 0 times
...
Jettie
10 months ago
A) After your first terraform plan
upvoted 0 times
...
Blondell
10 months ago
C) After your first terraform init
upvoted 0 times
...
Lashandra
10 months ago
A) After your first terraform plan
upvoted 0 times
...
Brock
10 months ago
Yeah, those random Terraform files can be confusing sometimes.
upvoted 0 times
...
Alease
11 months ago
I think it's after the first terraform init too.
upvoted 0 times
...
...
Ling
11 months ago
I agree with Kelvin, it makes sense for it to be created after the initialization process.
upvoted 0 times
...
Kelvin
11 months ago
I think the .terraform.lock.hc1 file is created after the first terraform init.
upvoted 0 times
...

Save Cancel