Skip to content

tfprotov5+tfprotov6: Copy MoveResourceState method into ResourceServer #363

@bflad

Description

@bflad

terraform-plugin-go version

v0.21.0 (not yet released)

Description

The upcoming v0.21.0 release will contain the tfprotov5 and tfprotov6 package ResourceServerWithMoveResourceState temporary interface, which contains the MoveResourceState RPC function handler. Rather than immediately requiring all downstream SDK implementations to implement this functionality immediately by requiring MoveResourceState as part of ResourceServer, it seems ideal if we can stagger the releases between introducing and supporting the new MoveResourceState bits then having a followup release that makes the implementation required with the "breaking change" to match the intended design of this Go module to always require all provider implementations to fully implement the protocol.

For provider developers, this type of terraform-plugin-go change previously surfaced as confusing missing method XXX when updating only some dependencies of terraform-plugin-framework, terraform-plugin-mux, terraform-plugin-sdk, or terraform-plugin-testing where terraform-plugin-go required the additional ResourceServer bits, but with the newer setup there can at least be better chance that particular update issue won't occur for them and changelog can reference the minimum SDK versions.

Proposal

Move the MoveResourceState method from ResourceServerWithMoveResourceState to ResourceServer. Remove temporary ResourceServerWithMoveResourceState interface, logic referencing it, and associated error diagnostics when it was missing in the server implementations.

References

Metadata

Metadata

Assignees

Labels

breaking-changeThis will impact or improve our compatibility postureenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions