nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · 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…

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.

Tools for Test Analysts

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-003 question #3 exhibit

Options

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

How the community answered

(65 responses)
  • A
    12% (8)
  • B
    77% (50)
  • C
    8% (5)
  • D
    3% (2)

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#remote backend#S3#state migration

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice