BlackFriday 2024! 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
2 months ago
I think it's actually when you enable state locking, to prevent conflicts.
upvoted 0 times
...
Whitley
2 months ago
But doesn't it make more sense for it to be after your first terraform plan?
upvoted 0 times
...
Paz
2 months 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
2 months 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
2 months 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
Gerald
27 days ago
Hmm, I'm gonna go with B. You can't plan what you haven't applied, can you?
upvoted 0 times
...
Sage
1 months ago
Actually, I believe it's B) After your first terraform apply.
upvoted 0 times
...
Mireya
1 months ago
No, I'm pretty sure it's D) When you enable state locking.
upvoted 0 times
...
Cherri
1 months ago
I think it's C) After your first terraform init.
upvoted 0 times
...
...
Tresa
2 months ago
I believe it's after your first terraform apply.
upvoted 0 times
...
Luis
2 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
1 months 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
1 months ago
I think it's actually after the first 'terraform init'. That's when the lock file is created.
upvoted 0 times
...
Eun
1 months ago
D) When you enable state locking
upvoted 0 times
...
Velda
1 months ago
C) After your first terraform init
upvoted 0 times
...
Teddy
2 months ago
B) After your first terraform apply
upvoted 0 times
...
Emerson
2 months ago
A) After your first terraform plan
upvoted 0 times
...
...
Whitley
2 months ago
I think it's after your first terraform init.
upvoted 0 times
...
Eun
2 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
2 months ago
Yeah, definitely. It's like they appear out of nowhere!
upvoted 0 times
...
Stevie
2 months ago
I think it's after the first 'terraform init' too. Those hidden files always sneak up on you.
upvoted 0 times
...
...

Save Cancel