nerdexam
HashiCorp

TA-002-P · Question #216

State locking does not happen automatically and must be specified at run

The correct answer is A. False. This statement is FALSE. State locking happens automatically whenever an operation that could write state is performed (e.g., apply, plan). Terraform locks the state file to prevent concurrent modifications. No special flag is needed to enable locking - it is built-in behavior…

Implement and maintain state

Question

State locking does not happen automatically and must be specified at run

Options

  • AFalse
  • BTrue

How the community answered

(27 responses)
  • A
    93% (25)
  • B
    7% (2)

Explanation

This statement is FALSE. State locking happens automatically whenever an operation that could write state is performed (e.g., apply, plan). Terraform locks the state file to prevent concurrent modifications. No special flag is needed to enable locking - it is built-in behavior when using a backend that supports it (like S3 with DynamoDB, or Terraform Cloud).

Topics

#State locking#Terraform state#Concurrency#Backend configuration

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice