nerdexam
HashiCorp

TA-002-P · Question #404

A Terraform backend determines how Terraform loads state and stores updates when you execute ___________.

The correct answer is D. All of the above. A Terraform backend governs how state is loaded and persisted, which applies to apply, taint, and destroy operations - all commands that read or write state.

Implement and maintain state

Question

A Terraform backend determines how Terraform loads state and stores updates when you execute ___________.

Options

  • Aapply
  • Btaint
  • Cdestroy
  • DAll of the above
  • ENone of the above

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    4% (1)
  • D
    89% (24)
  • E
    4% (1)

Why each option

A Terraform backend governs how state is loaded and persisted, which applies to apply, taint, and destroy operations - all commands that read or write state.

Aapply

Apply alone is incomplete; taint and destroy also interact with the backend for state reads and writes.

Btaint

Taint alone is incomplete; apply and destroy also rely on the backend.

Cdestroy

Destroy alone is incomplete; apply and taint also interact with state through the backend.

DAll of the aboveCorrect

The backend is responsible for storing state and locking it during operations. Any command that reads or modifies state - including apply, taint, and destroy - goes through the configured backend, so all of the listed operations are covered.

ENone of the above

None of the above is incorrect because apply, taint, and destroy all depend on the backend for state management.

Concept tested: Terraform backend state management scope

Source: https://developer.hashicorp.com/terraform/language/settings/backends/configuration

Topics

#Terraform backend#Terraform state#State management#Terraform CLI

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice