Trying to store an existing local terraform state file to the backend state storage S3. But running the terraform apply command throws error "Resource already exists".
Is there a method to successfully sync an existing .tfstate to AWS s3 ?
After you setup the backend configuration code to an S3 bucket in Terraform
run this command to push any local terraform state to AWS S3 using:
terraform state push <path to your local state>
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more