You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An error to be raised by the SDK about the situation, the SDK to skip the StateUpgradeFunc, or the State Migration documentation to mention the need for nil checking (and potentially why).
Actual Behavior
Provider panic due to lack of nil checking in StateUpgraderFunc.
Steps to Reproduce
terraform init (Terraform AWS Provider version 2.48.0 or earlier, which will have aws_db_instance resource with SchemaVersion: 0)
terraform apply
??? (not sure how it got into empty raw state)
terraform init (Terraform AWS Provider version 2.49.0 or later)
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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
SDK version
Relevant provider source code
https://github.com/terraform-providers/terraform-provider-aws/blob/2cb4e3f7f017feb338e0ba2ffdf409d6b0c91793/aws/resource_aws_db_instance.go#L29-L36
https://github.com/terraform-providers/terraform-provider-aws/blob/2cb4e3f7f017feb338e0ba2ffdf409d6b0c91793/aws/resource_aws_db_instance_migrate.go#L381-L384
Terraform Configuration Files
Can try to provide if needed, but not sure how we got here either. 😄
Debug Output
https://gist.github.com/ca3825d27e669d6e42c4d3e40f9acaff
Expected Behavior
An error to be raised by the SDK about the situation, the SDK to skip the
StateUpgradeFunc
, or the State Migration documentation to mention the need fornil
checking (and potentially why).Actual Behavior
Provider panic due to lack of
nil
checking inStateUpgraderFunc
.Steps to Reproduce
terraform init
(Terraform AWS Provider version 2.48.0 or earlier, which will haveaws_db_instance
resource withSchemaVersion: 0
)terraform apply
terraform init
(Terraform AWS Provider version 2.49.0 or later)terraform plan
References
The text was updated successfully, but these errors were encountered: