nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #61

Where does the Terraform local backend store its state?

The correct answer is C. In the terraform,tfstate file. Terraform's local backend stores state in a file named terraform.tfstate in the current working directory where Terraform commands are run. This is the default behavior when no backend is explicitly configured. The state file is a JSON document that tracks the mapping between you

Submitted by skyler.x· Apr 18, 2026Manage Terraform State

Question

Where does the Terraform local backend store its state?

Options

  • AIn the terraform file
  • BIn the /tmp directory
  • CIn the terraform,tfstate file
  • DIn the user's terraform,state file

How the community answered

(26 responses)
  • B
    4% (1)
  • C
    92% (24)
  • D
    4% (1)

Explanation

Terraform's local backend stores state in a file named terraform.tfstate in the current working directory where Terraform commands are run. This is the default behavior when no backend is explicitly configured. The state file is a JSON document that tracks the mapping between your configuration and the real-world infrastructure. For team environments, a remote backend (e.g., Terraform Cloud, S3) is recommended to enable state locking and sharing.

Topics

#Terraform state#Local backend#State file location#terraform.tfstate

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice