nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #233

By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?

The correct answer is B. A file in your configuration's directory named terraform.tfstate. Terraform uses a state file to map real-world resources to your configuration. By default, if no backend is explicitly defined, Terraform stores this information in a file named terraform.tfstate located in the same directory as your configuration files. This local state file…

Submitted by tarun92· Apr 18, 2026Manage Terraform State

Question

By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?

Options

  • AA subdirectory of your home directory named .terraform.d
  • BA file in your configuration's directory named terraform.tfstate
  • CA file in your configuration's directory named .terraform.lock.hcl
  • DA subdirectory of your configuration named .terraform

How the community answered

(35 responses)
  • A
    3% (1)
  • B
    94% (33)
  • D
    3% (1)

Explanation

Terraform uses a state file to map real-world resources to your configuration. By default, if no backend is explicitly defined, Terraform stores this information in a file named terraform.tfstate located in the same directory as your configuration files. This local state file is critical for Terraform to understand what infrastructure already exists and to plan updates correctly.

Topics

#Terraform state#Local state#State file#Default behavior

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice