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 30 Discussion

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

Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)

Show Suggested Answer Hide Answer
Suggested Answer: A, B, C

When the state file is locked, operations that modify or depend on the state (like terraform apply, terraform destroy, and terraform state list) are blocked. terraform fmt only formats the configuration files and does not interact with the state, so it is allowed.

References:

Terraform State Locking


Contribute your Thoughts:

Elliot
5 days ago
Definitely can't do terraform apply when it's locked.
upvoted 0 times
...
Kristin
11 days ago
I'm pretty certain that both terraform apply and terraform destroy are forbidden, but I need to double-check on terraform state list.
upvoted 0 times
...
Tarra
16 days ago
I feel like terraform fmt might be okay since it’s just formatting, but I can't recall if it gets affected by the lock.
upvoted 0 times
...
Sarah
22 days ago
I remember practicing a question like this, and I think terraform destroy is also not allowed when the state file is locked.
upvoted 0 times
...
Rashida
28 days ago
I think terraform apply is definitely forbidden when the state file is locked, but I'm not sure about terraform state list.
upvoted 0 times
...
Floyd
28 days ago
Alright, I've got a strategy here. I'll start by eliminating the obvious ones - `terraform apply` and `terraform destroy` are clearly state-modifying commands, so they're likely forbidden. Then I'll think about the other options and try to reason out which ones might be allowed or not allowed when the state file is locked.
upvoted 0 times
...
Laticia
28 days ago
I'm a bit confused by this question. I know that the state file is important for managing infrastructure, but I'm not sure exactly what it means for the state file to be "locked." I'll have to review my notes on state file management before answering this.
upvoted 0 times
...
Lashunda
28 days ago
Okay, let's see here. I know that `terraform apply` and `terraform destroy` are both state-modifying commands, so those are probably off-limits. But I'm not sure about the others - I'll have to think this through.
upvoted 0 times
...
Ligia
1 months ago
Hmm, this seems straightforward. I'll need to carefully read through the options and think about which Terraform commands are likely to be forbidden when the state file is locked.
upvoted 0 times
...
Cora
10 months ago
Seriously, who keeps locking the state file? I'm just trying to do my job here. *sigh* Anyway, A, C, and D seem like the right answers.
upvoted 0 times
Elvera
9 months ago
We should be careful with those actions when the state file is locked.
upvoted 0 times
...
Lemuel
9 months ago
Yes, A, C, and D are the actions forbidden when the state file is locked.
upvoted 0 times
...
Anna
9 months ago
I know, it's frustrating when the state file is locked.
upvoted 0 times
...
...
Alyce
10 months ago
This question is a real Terraform trap! I'd say A, C, and D are the winners. Can't mess with the state when it's on lockdown.
upvoted 0 times
...
Nida
10 months ago
Ah, the old locked state file trick. I bet the devs just want to make sure we don't accidentally delete the production environment. No pressure, though!
upvoted 0 times
...
Elroy
10 months ago
Hold up, I know B is allowed. Gotta check the state even if it's locked, right? Otherwise, how would I know what's going on?
upvoted 0 times
Wei
10 months ago
C) terraform destroy
upvoted 0 times
...
Jackie
10 months ago
B) terraform state list
upvoted 0 times
...
Karol
10 months ago
A) terraform apply
upvoted 0 times
...
...
Kate
11 months ago
Hmm, I think A, C, and D are the correct answers. Can't do anything that modifies the state file when it's locked!
upvoted 0 times
Desmond
10 months ago
Virgina: Exactly, we need to make sure the state file is unlocked before making any changes.
upvoted 0 times
...
Lavonda
10 months ago
User 3: So, we should be careful not to run terraform apply, terraform destroy, or terraform fmt when the state file is locked.
upvoted 0 times
...
Virgina
10 months ago
User 2: Yes, you're right. Those actions are forbidden when the Terraform state file is locked.
upvoted 0 times
...
Pok
10 months ago
User 1: I think A, C, and D are the correct answers.
upvoted 0 times
...
...
Lauryn
11 months ago
I think terraform fmt is not allowed when the state file is locked as well.
upvoted 0 times
...
Salome
11 months ago
I believe terraform destroy is also forbidden when the state file is locked.
upvoted 0 times
...
Adelina
11 months ago
I agree with Isabella. terraform apply should not be allowed when the state file is locked.
upvoted 0 times
...
Isabella
11 months ago
I think terraform apply is forbidden when the state file is locked.
upvoted 0 times
...

Save Cancel