AZ400-Q: protect shared Terraform state
Multiple pipeline runs manage the same infrastructure with Terraform. Concurrent applies have caused state corruption and drift. What is required?
- A) Store the state file in every developer’s local directory.
- B) Disable all state tracking.
- C) Use a secured remote backend with state locking and serialize/coordinate applies for the shared environment. ✓
- D) Put the state in a pull-request comment.
Answer: C. Shared remote state plus locking and controlled concurrency prevents conflicting applies and provides a consistent source of infrastructure state.
Why not the others: Local/no state and comments are not reliable shared state management.