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?
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?
To migrate your current state file to a new S3 remote backend in Terraform, you would use the command 'terraform init'. This command initializes the working directory containing Terraform configuration files and sets up the backend, including migrating the Terraform state file to the backend specified in the configuration.
Answer is correct, terraform init migrates the state.
terraform init -migrate-state
I will go with B
I will go for B
A. terraform state just state your .tf B. Terraform init synch with backend C. Refresh, refreshes config D. Push, not sure