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: Remove temporary ResourceServerWithMoveResourceState interface #408

Merged
merged 2 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/BREAKING CHANGES-20240510-105824.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: BREAKING CHANGES
body: 'tfprotov5+tfprotov6: Removed temporary `ResourceServerWithMoveResourceState`
interface type. Use `ResourceServer` instead.'
time: 2024-05-10T10:58:24.383876-04:00
custom:
Issue: "408"
6 changes: 6 additions & 0 deletions .changes/unreleased/NOTES-20240510-105942.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: NOTES
body: 'all: If using terraform-plugin-mux, it must be upgraded to v0.16.0 or later
to prevent compilation errors'
time: 2024-05-10T10:59:42.325131-04:00
custom:
Issue: "408"
20 changes: 0 additions & 20 deletions tfprotov5/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,6 @@ type ResourceServer interface {
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
}

// ResourceServerWithMoveResourceState is a temporary interface for servers
// to implement MoveResourceState RPC handling.
//
// Deprecated: This interface will be removed in a future version. Use
// ResourceServer instead.
type ResourceServerWithMoveResourceState interface {
ResourceServer

// MoveResourceState is called when Terraform is asked to change a resource
// type for an existing resource. The provider must accept the change as
// valid by ensuring the source resource type, schema version, and provider
// address are compatible to convert the source state into the target
// resource type and latest state version.
//
// This functionality is only supported in Terraform 1.8 and later. The
// provider must have enabled the MoveResourceState server capability to
// enable these requests.
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
}

// ValidateResourceTypeConfigRequest is the request Terraform sends when it
// wants to validate a resource's configuration.
type ValidateResourceTypeConfigRequest struct {
Expand Down
20 changes: 0 additions & 20 deletions tfprotov6/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,6 @@ type ResourceServer interface {
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
}

// ResourceServerWithMoveResourceState is a temporary interface for servers
// to implement MoveResourceState RPC handling.
//
// Deprecated: This interface will be removed in a future version. Use
// ResourceServer instead.
type ResourceServerWithMoveResourceState interface {
ResourceServer

// MoveResourceState is called when Terraform is asked to change a resource
// type for an existing resource. The provider must accept the change as
// valid by ensuring the source resource type, schema version, and provider
// address are compatible to convert the source state into the target
// resource type and latest state version.
//
// This functionality is only supported in Terraform 1.8 and later. The
// provider must have enabled the MoveResourceState server capability to
// enable these requests.
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
}

// ValidateResourceConfigRequest is the request Terraform sends when it
// wants to validate a resource's configuration.
type ValidateResourceConfigRequest struct {
Expand Down
Loading