exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 110 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 110
Topic #: 1
[All Terraform Associate Questions]

What does state locking accomplish?

  • A. Copies the state file from memory to disk
  • B. Encrypts any credentials stored within the state file
  • C. Blocks Terraform commands from modifying the state file
  • D. Prevents accidental deletion of the state file
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Uma10
Highly Voted 1 year ago
Selected Answer: C
If supported by your backend, Terraform will lock your state for all operations that could write state. This prevents others from acquiring the lock and potentially corrupting your state. Source: https://www.terraform.io/language/state/locking
upvoted 8 times
...
chael88
Highly Voted 7 months, 2 weeks ago
Just passed the exam. There was a similar question not listed here on ExamTopic: What backend types supports state locking? A. local B. None C. All D. Some I chose D. Some as according to Hashicorp document: "Not all backends support locking" Source: https://developer.hashicorp.com/terraform/language/state/backends
upvoted 8 times
phidelics
5 months, 3 weeks ago
Not all backends supports state locking. you are right with option D
upvoted 2 times
...
...
Ni33
Most Recent 4 months ago
Selected Answer: C
C is the right answer
upvoted 1 times
...
Power123
5 months, 1 week ago
C is correct
upvoted 1 times
...
adouban
9 months ago
Selected Answer: C
C state locking is protect state file from modification at the same time
upvoted 2 times
...
barracouto
11 months ago
Selected Answer: C
I really wonder if exam topics needs to display the incorrect answers for legality purposes. It's C.
upvoted 3 times
secdaddy
9 months, 1 week ago
They're guessing at answers and then refining by croudsourcing answers from us
upvoted 1 times
...
...
asudhin
11 months, 2 weeks ago
Selected Answer: C
It's C
upvoted 1 times
...
legendary7
11 months, 2 weeks ago
C-is the correct answer https://www.terraform.io/language/state/locking
upvoted 1 times
...
RVivek
11 months, 3 weeks ago
Selected Answer: C
Blocks Terraform commands from modifying the state file. Since already one command is doing a modification and mutiple simultaneous writes can make it inconsistant
upvoted 1 times
...
bora4motion
1 year ago
Selected Answer: C
I go with C
upvoted 3 times
...
Burakko
1 year ago
Selected Answer: C
It just locks the state file not to be modified.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago