nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #133

Which are forbidden actions when the terraform state file is locked? Choose three correct answers.

The correct answer is B. Terraform destroy C. Terraform validate F. Terraform apply. The terraform state file is locked when a Terraform operation that could write state is in progress. This prevents concurrent state operations that could corrupt the state. The forbidden actions when the state file is locked are those that could write state, such as terraform app

Submitted by tyler.j· Apr 18, 2026Manage Terraform State

Question

Which are forbidden actions when the terraform state file is locked? Choose three correct answers.

Options

  • ATerraform state list
  • BTerraform destroy
  • CTerraform validate
  • DTerraform validate
  • ETerraform for
  • FTerraform apply

How the community answered

(33 responses)
  • A
    6% (2)
  • B
    88% (29)
  • D
    3% (1)
  • E
    3% (1)

Explanation

The terraform state file is locked when a Terraform operation that could write state is in progress. This prevents concurrent state operations that could corrupt the state. The forbidden actions when the state file is locked are those that could write state, such as terraform apply, terraform destroy, terraform refresh, terraform taint, terraform untaint, terraform import, and terraform state *. The terraform validate command is also forbidden, because it requires an initialized working directory with the state file. The allowed actions when the state file is locked are those that only read state, such as terraform plan, terraform show, terraform output, and terraform console.

Topics

#Terraform State#State Locking#Terraform CLI#Concurrency Control

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice