What is the purpose of state locking in a remote backend?
A.
Encrypts the state in the remote backend.
B.
Requires every instance of Terraform to use the same provider version.
C.
Creates a backup of the state file in a secure location.
D.
Ensures only one instance of Terraform can modify the state at a time.
The Answer Is:
D
This question includes an explanation.
Explanation:
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., , ]
Terraform-Associate-004 PDF/Engine
Printable Format
Value of Money
100% Pass Assurance
Verified Answers
Researched by Industry Experts
Based on Real Exams Scenarios
100% Real Questions
Get 65% Discount on All Products,
Use Coupon: "ac4s65"