hashicorp/terraform-plugin-framework

Support upgrading resource state

paddycarver opened this issue · 1 comments

Module version

N/A

Use-cases

Sometimes resource schemas change over time and need massaging to be converted to the new format. This isn't usually needed; a refresh should update everything nicely. But if some values can't be populated by refresh, or refresh can't run without some values, and those values need to be migrate to a new data type or format, then provider-assisted state upgrades are necessary.

We should offer an optional method on resource types to support this callback.

Attempted Solutions

N/A

Proposal

Add an optional method on the Resource interface that lets providers modify the state when Terraform calls UpgradeResourceState.

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.