-
Notifications
You must be signed in to change notification settings - Fork 10k
Description
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).
Actual Behavior
My Terraform project is now dependent on 0.12.13 so now all of my team members and I have to upgrade our CLIs and upgrade the CLI in our CI pipeline Docker image.