HashiCorpHashiCorp
TERRAFORM-ASSOCIATE-004 · Question #3
TERRAFORM-ASSOCIATE-004 Question #3: Real Exam Question with Answer & Explanation
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?
Options
- Aterraform state
- Bterraform init
- Cterraform push
- Dterraform refresh
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.