-
Notifications
You must be signed in to change notification settings - Fork 95
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
Unable to Read Previously Saved State for UpgradeResourceState TF 0.12 #415
Comments
Some initial ideas around resolution include the below, without investigating the underlying details too much yet or considering whether they could have bad consequences: If an unsupported attribute error happens there in the logic, checking to see if the resource implements state upgrades and walking backwards through versions to find a prior schema that does decode the value properly, then run that specific state upgrader. Whether we can convince terraform-plugin-go's Similarly, we could see if terraform-plugin-go's |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Module version
Relevant provider source code
Terraform Configuration Files
Debug Output
https://gist.github.com/bendbennett/d6ff45746b0ec931389b9ec5cfc79ee7
Expected Behavior
During the running of the test to verify that upgrading the provider from
v3.3.2
to current version (v4.0.0
) upgrade resource state should run without error.Actual Behavior
The following error is generated:
Steps to Reproduce
This can be reproduced by running the test using TF 0.12.
Investigation
The issue arises as a consequence of the fact that TF core behaves differently in versions >= 0.13 in that, if attributes defined within a schema do not have a matching value stored within state then they are ignored, whereas in TF 0.12 this results in an error.
This appears to arise within the UpgradeResourceState func.
The text was updated successfully, but these errors were encountered: