ExamGecko
Question list
Search
Search

Question 156 - Terraform Associate 003 discussion

Report
Export

Which of these actions will prevent two Terraform runs from changing the same state file at the same time?

A.
Refresh the state after running Terraform
Answers
A.
Refresh the state after running Terraform
B.
Delete the state before running Terraform
Answers
B.
Delete the state before running Terraform
C.
Configure state locking for your state backend
Answers
C.
Configure state locking for your state backend
D.
Run Terraform with parallelism set to 1
Answers
D.
Run Terraform with parallelism set to 1
Suggested answer: B

Explanation:

To prevent two Terraform runs from changing the same state file simultaneously, state locking is used. State locking ensures that when one Terraform operation is running, others will be blocked from making changes to the same state, thus preventing conflicts and data corruption. This is achieved by configuring the state backend to support locking, which will lock the state for all operations that could write to the state. Reference = This information is supported by Terraform's official documentation, which explains the importance of state locking and how it can be configured for different backends to prevent concurrent state modifications .

asked 18/09/2024
ACHILLE CARROLL
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first