nerdexam
HashiCorp

TA-002-P · Question #174

When multiple engineers start deploying infrastructure using the same state file, what is a feature of remote state storage that is critical to ensure the state doesn't become corrupt?

The correct answer is B. State Locking. State Locking is the critical feature. When multiple engineers use the same state file, concurrent terraform apply runs can read a stale state, make conflicting changes, and write back a corrupted or inconsistent state file. State locking ensures that only one operation can modif

Implement and maintain state

Question

When multiple engineers start deploying infrastructure using the same state file, what is a feature of remote state storage that is critical to ensure the state doesn't become corrupt?

Options

  • AObject Storage
  • BState Locking
  • CWorkSpaces
  • DEncryption

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    87% (26)
  • C
    7% (2)
  • D
    3% (1)

Explanation

State Locking is the critical feature. When multiple engineers use the same state file, concurrent terraform apply runs can read a stale state, make conflicting changes, and write back a corrupted or inconsistent state file. State locking ensures that only one operation can modify state at a time - any other operation attempting to acquire the lock will be blocked until the first completes. Object storage provides durability, encryption provides confidentiality, and workspaces provide isolation - but none of these prevent concurrent writes from corrupting state the way locking does.

Topics

#Remote State#State Locking#Collaborative Terraform#State Management

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice