Exam4Training

Which command will migrate your current state file to the new S3 remote backend?

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?
A . terraform state
B . terraform init
C . terraform push
D . terraform refresh

Answer: B

Explanation:

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

Exit mobile version