-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to terraform apply with tfplan generated by tfmigrate plan --out=tfplan in Terraform 1.1 #62
Comments
After debugging, I found that the Since terraform state push increments the serial of tfstate, a saved plan file in tfmigrate plan phase should not be able to terraform apply. However, prior to Terraform 1.1, there was no proper validation and terraform apply allows a such case incorrectly. Starting from Terraform 1.1, it now rejects the plan as stale, which seems to be a correct behavior. That is, the Fortunately, Terraform 1.1 added a new So, I decided to deprecate the |
Closes #62 The tfmigrate plan --out=tfplan option was originally requested in #36, and added in #37. While testing Terraform 1.1 support, I found it no longer work with Terraform 1.1. #62 After debugging, the tfmigrate plan --out=tfplan option was based on a bug prior to Terraform 1.1. Since terraform state push increments the serial of tfstate, a saved plan file in tfmigrate plan phase should not be able to terraform apply. However, prior to Terraform 1.1, there was no proper validation and terraform apply allows a such case incorrectly. Starting from Terraform 1.1, it now rejects the plan as stale, which seems to be a correct behavior. That is, the tfmigrate plan --out=tfplan option doesn't work with Terraform 1.1 or later. There is no way to do this. Fortunately, Terraform 1.1 added a new `moved` block feature, so some use-cases could be covered by the `moved` block. So, I decided to deprecate the tfmigrate plan --out=tfplan option without replacement and it will be removed in a future release.
Closes #62 The tfmigrate plan --out=tfplan option was originally requested in #36, and added in #37. While testing Terraform 1.1 support, I found it no longer work with Terraform 1.1. #62 After debugging, the tfmigrate plan --out=tfplan option was based on a bug prior to Terraform 1.1. Since terraform state push increments the serial of tfstate, a saved plan file in tfmigrate plan phase should not be able to terraform apply. However, prior to Terraform 1.1, there was no proper validation and terraform apply allows a such case incorrectly. Starting from Terraform 1.1, it now rejects the plan as stale, which seems to be a correct behavior. That is, the tfmigrate plan --out=tfplan option doesn't work with Terraform 1.1 or later. There is no way to do this. Fortunately, Terraform 1.1 added a new `moved` block feature, so some use-cases could be covered by the `moved` block. So, I decided to deprecate the tfmigrate plan --out=tfplan option without replacement and it will be removed in a future release.
The text was updated successfully, but these errors were encountered: