hashicorp / terraform-plugin-go

A low-level Go binding for the Terraform protocol for integrations to be built on top of.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tfprotov5+tfprotov6: Implement MoveResourceState RPC

bflad opened this issue · comments

terraform-plugin-go version

v0.20.0

Use cases

Protocol versions 5.5/6.5, as part of Terraform 1.8, will also be introducing the MoveResourceState RPC, which is intended to enable provider developers to support state move across resource types. In practice, this enables use cases such as renaming resource types or migrating between known-compatible providers with differing resource type names.

Proposal

The MoveResourceState RPC handling is built on top of already existing data handling types, so this implementation is relatively straightforward in the tfprotov5 and tfprotov6 packages:

  • Implement the new MoveResourceState server capability so the providers can announce they support this new RPC.
  • Implement a temporary ResourceServerWithMoveResourceState interface that implements new MoveResourceState method, along with its request and response types.
  • Update tf5server/tf6server implementations for the new RPC and check for the temporary interface.

Another issue will be created to perform the breaking change of moving the MoveResourceState method into the existing ResourceServer interface. This will allow a grace period for all officially supported SDKs to implement the new method without the breaking change, then the breaking change can be announced with the required versions of each SDK all at once when they upgrade this Go module to the version that requires the implementation.

References

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.