nerdexam
HashiCorp

TA-002-P · Question #344

You have to initialize a Terraform backend before it can be configured.

The correct answer is A. True. True. You must run 'terraform init' before Terraform can use any backend configuration. The init phase reads the backend block in your configuration, downloads the required backend plugin or sets up the remote state connection, and prepares the working directory. Without initiali

Implement and maintain state

Question

You have to initialize a Terraform backend before it can be configured.

Options

  • ATrue
  • BFalse

How the community answered

(19 responses)
  • A
    89% (17)
  • B
    11% (2)

Explanation

True. You must run 'terraform init' before Terraform can use any backend configuration. The init phase reads the backend block in your configuration, downloads the required backend plugin or sets up the remote state connection, and prepares the working directory. Without initialization, Terraform has no knowledge of where or how to store state, so any subsequent commands (plan, apply) will fail or default to local state.

Topics

#Terraform backend#Initialization#terraform init#State management

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice