nerdexam
HashiCorp

TA-002-P · Question #231

You can migrate the Terraform backend but only if there are no resources currently being managed.

The correct answer is A. False. This statement is false. You can migrate the Terraform backend at any time, even with existing managed resources. When you change the backend configuration and run 'terraform init', Terraform detects the change and offers to copy (migrate) the existing state from the old backend

Implement and maintain state

Question

You can migrate the Terraform backend but only if there are no resources currently being managed.

Options

  • AFalse
  • BTrue

How the community answered

(34 responses)
  • A
    94% (32)
  • B
    6% (2)

Explanation

This statement is false. You can migrate the Terraform backend at any time, even with existing managed resources. When you change the backend configuration and run 'terraform init', Terraform detects the change and offers to copy (migrate) the existing state from the old backend to the new one. Your resources remain tracked throughout the migration.

Topics

#Terraform backend#State migration#Terraform state

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice