-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Terraform state push with -force flag does not work #26224
Copy link
Copy link
Closed
Labels
bugduplicateissue closed because another issue already tracks this problemissue closed because another issue already tracks this problem
Description
Terraform Version
Terraform v0.13.2
+ provider registry.terraform.io/hashicorp/aws v3.4.0
+ provider registry.terraform.io/hashicorp/external v1.2.0
+ provider registry.terraform.io/hashicorp/kubernetes v1.12.0
+ provider registry.terraform.io/hashicorp/random v2.2.1
+ provider registry.terraform.io/hashicorp/template v2.1.2
+ provider registry.terraform.io/oktadeveloper/okta v3.4.1
+ provider registry.terraform.io/terraform-providers/okta v3.5.0
This is using the s3 backend
Expected Behavior
Running terraform state push -force should ignore serial check.
Actual Behavior
Running terraform state push -force <file> returns Failed to write state: cannot import state with serial 70 over newer state with serial 172, but as stated in the documentation Both of these safety checks can be disabled with the -force flag.
Steps to Reproduce
- Have existing terraform repo
- terraform state pull > $filename
- terraform apply (something that is NOT no-op)
- terraform state push $filename (gets rejected due to higher serial)
- terraform state push -force $filename (serial check should be ignored, but is not)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugduplicateissue closed because another issue already tracks this problemissue closed because another issue already tracks this problem