Detailed Explanation:
Rationale for Correct Answer:State locking prevents concurrent operations from modifying the same state simultaneously. This avoids race conditions and state corruption when multiple operators or automation pipelines run Terraform against the same remote state.
Analysis of Incorrect Options (Distractors):
A: Incorrect. Encryption may be provided by the backend or platform, but it is not the purpose of locking.
B: Incorrect. Provider version consistency is managed through version constraints and dependency lock files (.terraform.lock.hcl), not state locking.
C: Incorrect. Backups/snapshots may exist depending on the backend, but that’s separate from the locking mechanism.
Key Concept:Remote state locking to prevent simultaneous writes and protect state integrity.
[Reference:Implement and Maintain State — remote state and locking to prevent concurrent state modification., , , , , ]
Submit