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 3 Question 22 Discussion

Actual exam question for HashiCorp's Terraform-Associate-003 exam
Question #: 22
Topic #: 3
[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:

Alida
14 days ago
I think it's actually when you enable state locking, to prevent conflicts.
upvoted 0 times
...
Whitley
17 days ago
But doesn't it make more sense for it to be after your first terraform plan?
upvoted 0 times
...
Paz
20 days ago
Wait, is this a trick question? What if Terraform just creates that file whenPazr it feels like it, just to mess with us? Wouldn't put it past those devs, am I right?
upvoted 0 times
...
Stephen
22 days ago
Clearly, it's when you enable state locking. Terraform's all about the security, am I right? Or maybe it's just trying to keep us on our toes. Either way, I'm stumped!
upvoted 0 times
...
Dominga
25 days ago
Hmm, I'm gonna go with B. You can't plan what you haven't applied, can you? Though I do wonder if Terraform has a secret mind-reading ability we don't know about.
upvoted 0 times
Mireya
3 days ago
No, I'm pretty sure it's D) When you enable state locking.
upvoted 0 times
...
Cherri
5 days ago
I think it's C) After your first terraform init.
upvoted 0 times
...
...
Tresa
27 days ago
I believe it's after your first terraform apply.
upvoted 0 times
...
Luis
1 months ago
C'mon, it's gotta be after the first 'terraform apply'. That's when the real magic happens, right? Or is it just me?
upvoted 0 times
Tabetha
3 days ago
No, it's definitely after the first 'terraform apply'. That's when the changes are actually made to your infrastructure.
upvoted 0 times
...
Azzie
4 days ago
I think it's actually after the first 'terraform init'. That's when the lock file is created.
upvoted 0 times
...
Eun
5 days ago
D) When you enable state locking
upvoted 0 times
...
Velda
6 days ago
C) After your first terraform init
upvoted 0 times
...
Teddy
11 days ago
B) After your first terraform apply
upvoted 0 times
...
Emerson
14 days ago
A) After your first terraform plan
upvoted 0 times
...
...
Whitley
1 months ago
I think it's after your first terraform init.
upvoted 0 times
...
Eun
1 months ago
Ooh, this one's tricky! I bet it's after the first 'terraform init'. Gotta love those hidden files, am I right?
upvoted 0 times
Katheryn
24 days ago
Yeah, definitely. It's like they appear out of nowhere!
upvoted 0 times
...
Stevie
26 days ago
I think it's after the first 'terraform init' too. Those hidden files always sneak up on you.
upvoted 0 times
...
...

Save Cancel