nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #3

You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf. Which command will migrate your current state file to the new S3 r

The correct answer is B. terraform init. This command will initialize the new backend and prompt you to migrate the existing state file to the new location. The other commands are not relevant for this task.

Submitted by katya_ua· Apr 18, 2026Manage Terraform State

Question

You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf. Which command will migrate your current state file to the new S3 remote backend?

Exhibit

TERRAFORM-ASSOCIATE-004 question #3 exhibit

Options

  • Aterraform state
  • Bterraform init
  • Cterraform push
  • Dterraform refresh

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    83% (20)
  • C
    8% (2)
  • D
    4% (1)

Explanation

This command will initialize the new backend and prompt you to migrate the existing state file to the new location. The other commands are not relevant for this task.

Topics

#Terraform state management#Remote backends#terraform init command#State migration

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice