-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Terraform remote state push -force fails lineage check for S3 backend #25761
Copy link
Copy link
Closed
Labels
bugconfirmeda Terraform Core team member has reproduced this issuea Terraform Core team member has reproduced this issuecore
Description
Terraform Version
v0.12.29
Expected Behavior
The state should be pushed to the remote and forced over any existing state
Actual Behavior
$ tf state push -force B.tfstate
Failed to write state: cannot import state with lineage "c65f30fe-24db-19f7-43c8-bd29fb644be5" over unrelated state with lineage "bfeaceb5-75f6-5a22-5068-bc488243b268"
Steps to reproduce
I am using an s3 backend
terraform {
backend "s3" {
bucket = "my-terraform-state"
region = "us-east-1"
}
}
terraform workspace new A || terraform workspace select A
terraform apply -auto-approve
terraform state pull > A.state
terraform workspace new B || terraform workspace select B
terraform apply -auto-approve
terraform state pull > B.state
terraform workspace select A
terraform state push -force B.state
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugconfirmeda Terraform Core team member has reproduced this issuea Terraform Core team member has reproduced this issuecore