nerdexam
HashiCorpHashiCorp

TA-002-P · Question #404

TA-002-P Question #404: Real Exam Question with Answer & Explanation

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

Explanation

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.

Common mistakes.

  • A. Apply alone is incomplete; taint and destroy also interact with the backend for state reads and writes.
  • B. Taint alone is incomplete; apply and destroy also rely on the backend.
  • C. Destroy alone is incomplete; apply and taint also interact with state through the backend.
  • E. 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

Reference. 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 PracticeBrowse All TA-002-P Questions