nerdexam
HashiCorp

TA-002-P · Question #42

Where does the Terraform local backend store its state?

The correct answer is C. In the terraform.tfstate file. The Terraform local backend (the default when no backend block is configured) stores state in a file named 'terraform.tfstate' in the current working directory. The '.tfvars' file is for variable values, '.terraformrc' is for CLI configuration, and '/tmp' is not where Terraform…

Implement and maintain state

Question

Where does the Terraform local backend store its state?

Options

  • AIn the /tmp directory
  • BIn the terraform.tfvars file
  • CIn the terraform.tfstate file
  • DIn the user's .terraformrc file

How the community answered

(32 responses)
  • A
    6% (2)
  • B
    3% (1)
  • C
    88% (28)
  • D
    3% (1)

Explanation

The Terraform local backend (the default when no backend block is configured) stores state in a file named 'terraform.tfstate' in the current working directory. The '.tfvars' file is for variable values, '.terraformrc' is for CLI configuration, and '/tmp' is not where Terraform writes state. Option C is correct.

Topics

#Terraform State#Local Backend#State File#terraform.tfstate

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice