Skip to content

Commit 22700c0

Browse files
authored
tfprotov5+tfprotov6: Remove temporary ResourceServerWithMoveResourceState interface (#408)
Reference: #389 The `ResourceServerWithMoveResourceState` temporary interface was introduced as a way to onboard downstream SDKs onto the new `MoveResourceState` RPC before it was required. This enabled a period where terraform-plugin-go could support new functionality while not causing compilation errors if downstream Go modules happened to be referencing differing SDK versions that may or may not all support the new functionality immediately. Now that those downstream Go modules are referencing `ResourceServer` directly again, the temporary interface can be removed to prevent bloating this Go module.
1 parent 8d1c5ef commit 22700c0

4 files changed

Lines changed: 12 additions & 40 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: BREAKING CHANGES
2+
body: 'tfprotov5+tfprotov6: Removed temporary `ResourceServerWithMoveResourceState`
3+
interface type. Use `ResourceServer` instead.'
4+
time: 2024-05-10T10:58:24.383876-04:00
5+
custom:
6+
Issue: "408"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: NOTES
2+
body: 'all: If using terraform-plugin-mux, it must be upgraded to v0.16.0 or later
3+
to prevent compilation errors'
4+
time: 2024-05-10T10:59:42.325131-04:00
5+
custom:
6+
Issue: "408"

tfprotov5/resource.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,6 @@ type ResourceServer interface {
6565
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
6666
}
6767

68-
// ResourceServerWithMoveResourceState is a temporary interface for servers
69-
// to implement MoveResourceState RPC handling.
70-
//
71-
// Deprecated: This interface will be removed in a future version. Use
72-
// ResourceServer instead.
73-
type ResourceServerWithMoveResourceState interface {
74-
ResourceServer
75-
76-
// MoveResourceState is called when Terraform is asked to change a resource
77-
// type for an existing resource. The provider must accept the change as
78-
// valid by ensuring the source resource type, schema version, and provider
79-
// address are compatible to convert the source state into the target
80-
// resource type and latest state version.
81-
//
82-
// This functionality is only supported in Terraform 1.8 and later. The
83-
// provider must have enabled the MoveResourceState server capability to
84-
// enable these requests.
85-
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
86-
}
87-
8868
// ValidateResourceTypeConfigRequest is the request Terraform sends when it
8969
// wants to validate a resource's configuration.
9070
type ValidateResourceTypeConfigRequest struct {

tfprotov6/resource.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,6 @@ type ResourceServer interface {
6565
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
6666
}
6767

68-
// ResourceServerWithMoveResourceState is a temporary interface for servers
69-
// to implement MoveResourceState RPC handling.
70-
//
71-
// Deprecated: This interface will be removed in a future version. Use
72-
// ResourceServer instead.
73-
type ResourceServerWithMoveResourceState interface {
74-
ResourceServer
75-
76-
// MoveResourceState is called when Terraform is asked to change a resource
77-
// type for an existing resource. The provider must accept the change as
78-
// valid by ensuring the source resource type, schema version, and provider
79-
// address are compatible to convert the source state into the target
80-
// resource type and latest state version.
81-
//
82-
// This functionality is only supported in Terraform 1.8 and later. The
83-
// provider must have enabled the MoveResourceState server capability to
84-
// enable these requests.
85-
MoveResourceState(context.Context, *MoveResourceStateRequest) (*MoveResourceStateResponse, error)
86-
}
87-
8868
// ValidateResourceConfigRequest is the request Terraform sends when it
8969
// wants to validate a resource's configuration.
9070
type ValidateResourceConfigRequest struct {

0 commit comments

Comments
 (0)