TA-002-P · Question #81
TA-002-P Question #81: Real Exam Question with Answer & Explanation
The correct answer is D: State locking. State locking is the feature that prevents multiple administrators from simultaneously modifying the Terraform state file, thereby avoiding conflicts and corruption. This mechanism ensures only one operation can write to the state at a time.
Question
What features stops multiple admins from changing the Terraform state at the same time?
Options
- AVersion control
- BBackend types
- CProvider constraints
- DState locking
Explanation
State locking is the feature that prevents multiple administrators from simultaneously modifying the Terraform state file, thereby avoiding conflicts and corruption. This mechanism ensures only one operation can write to the state at a time.
Common mistakes.
- A. Version control helps track changes to configuration files, but it does not directly prevent concurrent writes to the active Terraform state file itself.
- B. Backend types determine where the state file is stored and how it's accessed, but specific backends enable state locking; the type itself is not the feature.
- C. Provider constraints define the acceptable versions of providers, which is unrelated to managing concurrent state access.
Concept tested. Terraform state locking
Reference. https://developer.hashicorp.com/terraform/language/state/locking
Topics
Community Discussion
No community discussion yet for this question.