Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 110

What does state locking accomplish?

    Correct Answer: C

    State locking in Terraform blocks commands from modifying the state file to prevent multiple simultaneous writes, which could potentially corrupt the state. By ensuring that only one command can modify the state at a time, it maintains the consistency and integrity of the state file.

Discussion
Uma10Option: 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

chael88

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

phidelics

Not all backends supports state locking. you are right with option D

BurakkoOption: C

It just locks the state file not to be modified.

barracoutoOption: C

I really wonder if exam topics needs to display the incorrect answers for legality purposes. It's C.

secdaddy

They're guessing at answers and then refining by croudsourcing answers from us

bora4motionOption: C

I go with C

adoubanOption: C

C state locking is protect state file from modification at the same time

Ni33Option: C

C is the right answer

Power123Option: C

C is correct

asudhinOption: C

It's C

legendary7Option: C

C-is the correct answer https://www.terraform.io/language/state/locking

RVivekOption: 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