IssueRaiser

Terraform State Snapshot Locked to 0.12.13 After Apply

I upgraded my terraform CLI from 0.12.9 to 0.12.13 while attempting to fix a problem unrelated to this bug report. In the process of dubugging this problem, I ran `terraform apply` unsuspecting that it would seemingly (for all intents and purposes) break my state in 0.12.9 forever. It turns out my problem was not solved by upgrading my CLI to 0.12.13 so I downgraded it back to 0.12.9. However, now in my Terraform project and all projects that pull in its state remotely I am experiencing this error on `plan` and `apply`. ``` Error: state snapshot was created by Terraform v0.12.13, which is newer than current v0.12.9; upgrade to Terraform v0.12.13 or greater to work with this state ``` ### Terraform Configuration Files ``` ... terraform { backend "s3" { bucket = "my-bucket" region = "us-west-2" key = "eks-terraform/state" dynamodb_table = "my-dynamodb-table" encrypt = true } } ... ``` ### Expected Behavior After upgrading to 0.12.13, on running `terraform apply` a prominent message is displayed warning me that continuing will upgrade my state and that it will be unusable in older versions of Terraform. Ideally, I would also have to provide some kind of flag or argument to bypass this warning so that I don't accidentally lock my state into this newer release. Alternatively, some kind of mechanism will exist allowing me to revert my state snapshot to a format that's compatible with the older release (0.12.9). ###

Posted by enummela on Nov 5, 2019, 9:00 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

ux (Other)

Terraform State Snapshot Locked to 0.12.13 After Apply

enummelaNov 5, 2019, 9:00 PM

I upgraded my terraform CLI from 0.12.9 to 0.12.13 while attempting to fix a problem unrelated to this bug report. In the process of dubugging this problem, I ran `terraform apply` unsuspecting that it would seemingly (for all intents and purposes) break my state in 0.12.9 forever. It turns out my problem was not solved by upgrading my CLI to 0.12.13 so I downgraded it back to 0.12.9. However, now in my Terraform project and all projects that pull in its state remotely I am experiencing this error on `plan` and `apply`. ``` Error: state snapshot was created by Terraform v0.12.13, which is newer than current v0.12.9; upgrade to Terraform v0.12.13 or greater to work with this state ``` ### Terraform Configuration Files ``` ... terraform { backend "s3" { bucket = "my-bucket" region = "us-west-2" key = "eks-terraform/state" dynamodb_table = "my-dynamodb-table" encrypt = true } } ... ``` ### Expected Behavior After upgrading to 0.12.13, on running `terraform apply` a prominent message is displayed warning me that continuing will upgrade my state and that it will be unusable in older versions of Terraform. Ideally, I would also have to provide some kind of flag or argument to bypass this warning so that I don't accidentally lock my state into this newer release. Alternatively, some kind of mechanism will exist allowing me to revert my state snapshot to a format that's compatible with the older release (0.12.9). ###

Comments (0)

No comments yet. Start the discussion.

Comment on this issue