Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tfprotov5+tfprotov6: Implement MoveResourceState RPC #362

Closed
bflad opened this issue Jan 12, 2024 · 1 comment · Fixed by #364
Closed

tfprotov5+tfprotov6: Implement MoveResourceState RPC #362

bflad opened this issue Jan 12, 2024 · 1 comment · Fixed by #364
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bflad
Copy link
Contributor

bflad commented Jan 12, 2024

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

@bflad bflad added the enhancement New feature or request label Jan 12, 2024
@bflad bflad added this to the v0.21.0 milestone Jan 12, 2024
@bflad bflad self-assigned this Jan 12, 2024
bflad added a commit that referenced this issue Jan 12, 2024
Reference: #363

The next version of the plugin protocol (5.5/6.5) includes support for moving resource state. This change introduces the initial implementation of that support including:

- Updated Protocol Buffers definitions
- Re-generated Protocol Buffers Go code
- Initial implementations of `tfprotov5` and `tfprotov6` package abstractions and wiring between those abstractions and the Protocol Buffers generated Go code
- Initial implementations of `tfprotov5/tf5server` and `tfprotov6/tf6server` for the new `MoveResourceState` RPC

This temporarily will not require `ProviderServer` implementations to include `MoveResourceState` implementation, however that change will occur in a subsequent release.
bflad added a commit that referenced this issue Jan 12, 2024
Reference: #362
Reference: #363

The next version of the plugin protocol (5.5/6.5) includes support for moving resource state. This change introduces the initial implementation of that support including:

- Updated Protocol Buffers definitions
- Re-generated Protocol Buffers Go code
- Initial implementations of `tfprotov5` and `tfprotov6` package abstractions and wiring between those abstractions and the Protocol Buffers generated Go code
- Initial implementations of `tfprotov5/tf5server` and `tfprotov6/tf6server` for the new `MoveResourceState` RPC

This temporarily will not require `ProviderServer` implementations to include `MoveResourceState` implementation, however that change will occur in a subsequent release.
bflad added a commit that referenced this issue Jan 17, 2024
Reference: #362
Reference: #363

The next version of the plugin protocol (5.5/6.5) includes support for moving resource state. This change introduces the initial implementation of that support including:

- Updated Protocol Buffers definitions
- Re-generated Protocol Buffers Go code
- Initial implementations of `tfprotov5` and `tfprotov6` package abstractions and wiring between those abstractions and the Protocol Buffers generated Go code
- Initial implementations of `tfprotov5/tf5server` and `tfprotov6/tf6server` for the new `MoveResourceState` RPC

This temporarily will not require `ProviderServer` implementations to include `MoveResourceState` implementation, however that change will occur in a subsequent release.
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant