Skip to content

Support upgrading resource state #42

@paddycarver

Description

@paddycarver

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestsdkv2-parityIssues tracking feature parity with terraform-plugin-sdk v2 and PRs working towards it.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions