diff --git a/docs/plugin-protocol/tfplugin6.proto b/docs/plugin-protocol/tfplugin6.proto index f001b4a4798f..b487ea578e5d 100644 --- a/docs/plugin-protocol/tfplugin6.proto +++ b/docs/plugin-protocol/tfplugin6.proto @@ -390,6 +390,11 @@ service Provider { // ConfigureStateStore configures the state store, such as S3 connection in the context of already configured provider rpc ConfigureStateStore(ConfigureStateStore.Request) returns (ConfigureStateStore.Response); + // ReadStateBytes streams byte chunks of a given state file from a state store + rpc ReadStateBytes(ReadStateBytes.Request) returns (stream ReadStateBytes.Response); + // WriteStateBytes streams byte chunks of a given state file into a state store + rpc WriteStateBytes(stream WriteStateBytes.RequestChunk) returns (WriteStateBytes.Response); + // GetStates returns a list of all states (i.e. CE workspaces) managed by a given state store rpc GetStates(GetStates.Request) returns (GetStates.Response); // DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace) @@ -896,7 +901,6 @@ message ValidateListResourceConfig { } } - message ValidateStateStore { message Request { string type_name = 1; @@ -911,12 +915,59 @@ message ConfigureStateStore { message Request { string type_name = 1; DynamicValue config = 2; + StateStoreClientCapabilities capabilities = 3; } message Response { repeated Diagnostic diagnostics = 1; + StateStoreServerCapabilities capabilities = 2; } } +message StateStoreClientCapabilities { + int64 chunk_size = 1; // suggested chunk size by Core +} + +message StateStoreServerCapabilities { + int64 chunk_size = 1; // chosen chunk size by plugin +} + +message ReadStateBytes { + message Request { + string type_name = 1; + string state_id = 2; + } + message Response { + bytes bytes = 1; + int64 total_length = 2; + StateRange range = 3; + repeated Diagnostic diagnostics = 4; + } +} + +message WriteStateBytes { + message RequestChunk { + // meta is sent with the first chunk only + optional RequestChunkMeta meta = 1; + + bytes bytes = 2; + int64 total_length = 3; + StateRange range = 4; + } + message Response { + repeated Diagnostic diagnostics = 1; + } +} + +message RequestChunkMeta { + string type_name = 1; + string state_id = 2; +} + +message StateRange { + int64 start = 1; + int64 end = 2; +} + message GetStates { message Request { string type_name = 1; diff --git a/internal/builtin/providers/terraform/provider.go b/internal/builtin/providers/terraform/provider.go index 6028fe7c0fea..89030e394c6e 100644 --- a/internal/builtin/providers/terraform/provider.go +++ b/internal/builtin/providers/terraform/provider.go @@ -295,6 +295,18 @@ func (p *Provider) ConfigureStateStore(req providers.ConfigureStateStoreRequest) return resp } +func (p *Provider) ReadStateBytes(req providers.ReadStateBytesRequest) providers.ReadStateBytesResponse { + var resp providers.ReadStateBytesResponse + resp.Diagnostics.Append(fmt.Errorf("unsupported state store type %q", req.TypeName)) + return resp +} + +func (p *Provider) WriteStateBytes(req providers.WriteStateBytesRequest) providers.WriteStateBytesResponse { + var resp providers.WriteStateBytesResponse + resp.Diagnostics.Append(fmt.Errorf("unsupported state store type %q", req.TypeName)) + return resp +} + func (p *Provider) GetStates(req providers.GetStatesRequest) providers.GetStatesResponse { var resp providers.GetStatesResponse resp.Diagnostics.Append(fmt.Errorf("unsupported state store type %q", req.TypeName)) diff --git a/internal/grpcwrap/provider6.go b/internal/grpcwrap/provider6.go index d16d6d086ade..78bf0b369de8 100644 --- a/internal/grpcwrap/provider6.go +++ b/internal/grpcwrap/provider6.go @@ -907,6 +907,14 @@ func (p *provider6) ConfigureStateStore(ctx context.Context, req *tfplugin6.Conf panic("not implemented") } +func (p *provider6) ReadStateBytes(req *tfplugin6.ReadStateBytes_Request, srv tfplugin6.Provider_ReadStateBytesServer) error { + panic("not implemented") +} + +func (p *provider6) WriteStateBytes(srv tfplugin6.Provider_WriteStateBytesServer) error { + panic("not implemented") +} + func (p *provider6) GetStates(ctx context.Context, req *tfplugin6.GetStates_Request) (*tfplugin6.GetStates_Response, error) { panic("not implemented") } diff --git a/internal/plugin/grpc_provider.go b/internal/plugin/grpc_provider.go index 3f8251b4a11d..f416e6e28904 100644 --- a/internal/plugin/grpc_provider.go +++ b/internal/plugin/grpc_provider.go @@ -1444,6 +1444,14 @@ func (p *GRPCProvider) ConfigureStateStore(r providers.ConfigureStateStoreReques panic("not implemented") } +func (p *GRPCProvider) ReadStateBytes(r providers.ReadStateBytesRequest) providers.ReadStateBytesResponse { + panic("not implemented") +} + +func (p *GRPCProvider) WriteStateBytes(r providers.WriteStateBytesRequest) providers.WriteStateBytesResponse { + panic("not implemented") +} + func (p *GRPCProvider) GetStates(r providers.GetStatesRequest) providers.GetStatesResponse { panic("not implemented") } diff --git a/internal/plugin6/grpc_provider.go b/internal/plugin6/grpc_provider.go index 0ab7da98b1a2..a475ec66549a 100644 --- a/internal/plugin6/grpc_provider.go +++ b/internal/plugin6/grpc_provider.go @@ -4,6 +4,7 @@ package plugin6 import ( + "bytes" "context" "errors" "fmt" @@ -11,6 +12,7 @@ import ( "sync" plugin "github.com/hashicorp/go-plugin" + "github.com/hashicorp/hcl/v2" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/function" ctyjson "github.com/zclconf/go-cty/cty/json" @@ -46,6 +48,11 @@ func (p *GRPCProviderPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Serve return nil } +// grpcMaxMessageSize is the maximum gRPC send and receive message sizes +// This matches the maximum set by a server implemented via terraform-plugin-go. +// See https://github.com/hashicorp/terraform-plugin-go/blob/a361c9bf/tfprotov6/tf6server/server.go#L88 +const grpcMaxMessageSize = 256 << 20 + // GRPCProvider handles the client, or core side of the plugin rpc connection. // The GRPCProvider methods are mostly a translation layer between the // terraform providers types and the grpc proto types, directly converting @@ -73,8 +80,12 @@ type GRPCProvider struct { // schema stores the schema for this provider. This is used to properly // serialize the requests for schemas. - mu sync.Mutex schema providers.GetProviderSchemaResponse + // stateChunkSize stores the negotiated chunk size for any implemented + // state store (keyed by type name) that have gone through successful configuration. + stateChunkSize map[string]int + + mu sync.Mutex } func (p *GRPCProvider) GetProviderSchema() providers.GetProviderSchemaResponse { @@ -1489,11 +1500,15 @@ func (p *GRPCProvider) ConfigureStateStore(r providers.ConfigureStateStoreReques return resp } + clientCapabilities := stateStoreClientCapabilitiesToProto(r.Capabilities) + logger.Trace("GRPCProvider.v6: ConfigureStateStore: proposing client capabilities", clientCapabilities) + protoReq := &proto6.ConfigureStateStore_Request{ TypeName: r.TypeName, Config: &proto6.DynamicValue{ Msgpack: mp, }, + Capabilities: clientCapabilities, } protoResp, err := p.client.ConfigureStateStore(p.ctx, protoReq) @@ -1501,10 +1516,237 @@ func (p *GRPCProvider) ConfigureStateStore(r providers.ConfigureStateStoreReques resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err)) return resp } + resp.Capabilities = stateStoreServerCapabilitiesFromProto(protoResp.Capabilities) + logger.Trace("GRPCProvider.v6: ConfigureStateStore: received server capabilities", resp.Capabilities) + resp.Diagnostics = resp.Diagnostics.Append(convert.ProtoToDiagnostics(protoResp.Diagnostics)) return resp } +func (p *GRPCProvider) ReadStateBytes(r providers.ReadStateBytesRequest) (resp providers.ReadStateBytesResponse) { + logger.Trace("GRPCProvider.v6: ReadStateBytes") + + // ReadStateBytes can be more sensitive to message sizes + // so we ensure it aligns with (the lower) terraform-plugin-go. + opts := grpc.MaxRecvMsgSizeCallOption{ + MaxRecvMsgSize: grpcMaxMessageSize, + } + + schema := p.GetProviderSchema() + if schema.Diagnostics.HasErrors() { + resp.Diagnostics = schema.Diagnostics + return resp + } + + if _, ok := schema.StateStores[r.TypeName]; !ok { + resp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf("unknown state store type %q", r.TypeName)) + return resp + } + + protoReq := &proto6.ReadStateBytes_Request{ + TypeName: r.TypeName, + StateId: r.StateId, + } + + // Start the streaming RPC with a context. The context will be cancelled + // when this function returns, which will stop the stream if it is still + // running. + ctx, cancel := context.WithCancel(p.ctx) + defer cancel() + + client, err := p.client.ReadStateBytes(ctx, protoReq, opts) + if err != nil { + resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err)) + return resp + } + + buf := &bytes.Buffer{} + var expectedTotalLength int + for { + chunk, err := client.Recv() + if err == io.EOF { + // No chunk is returned alongside an EOF. + // And as EOF is a sentinel error it isn't wrapped as a diagnostic. + break + } + if err != nil { + resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err)) + break + } + resp.Diagnostics = resp.Diagnostics.Append(convert.ProtoToDiagnostics(chunk.Diagnostics)) + if resp.Diagnostics.HasErrors() { + // If we have errors, we stop processing and return early + break + } + + if expectedTotalLength == 0 { + expectedTotalLength = int(chunk.TotalLength) + } + logger.Trace("GRPCProvider.v6: ReadStateBytes: received chunk for range", chunk.Range) + + // check the size of chunks matches to what was agreed + chunkSize, ok := p.stateChunkSize[r.TypeName] + if !ok { + resp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf("Unable to determine chunk size for provider %s; this is a bug in Terraform - please report it", r.TypeName)) + return resp + } + if chunk.Range.End < chunk.TotalLength { + // all but last chunk must match exactly + if len(chunk.Bytes) != chunkSize { + resp.Diagnostics = resp.Diagnostics.Append(&hcl.Diagnostic{ + Severity: hcl.DiagWarning, + Summary: "Unexpected size of chunk received", + Detail: fmt.Sprintf("Unexpected chunk of size %d was received, expected %d; this is a bug in the provider %s - please report it there", + len(chunk.Bytes), chunkSize, r.TypeName), + }) + } + } else { + // last chunk must be still within the agreed size + if len(chunk.Bytes) > chunkSize { + resp.Diagnostics = resp.Diagnostics.Append(&hcl.Diagnostic{ + Severity: hcl.DiagWarning, + Summary: "Unexpected size of last chunk received", + Detail: fmt.Sprintf("Last chunk exceeded agreed size, expected %d, given %d; this is a bug in the provider %s - please report it there", + chunkSize, len(chunk.Bytes), r.TypeName), + }) + } + } + + n, err := buf.Write(chunk.Bytes) + if err != nil { + resp.Diagnostics = resp.Diagnostics.Append(err) + break + } + logger.Trace("GRPCProvider.v6: ReadStateBytes: read bytes of a chunk", n) + } + + if resp.Diagnostics.HasErrors() { + logger.Trace("GRPCProvider.v6: ReadStateBytes: experienced an error when receiving state data from the provider", resp.Diagnostics.Err()) + return resp + } + + if buf.Len() != expectedTotalLength { + logger.Trace("GRPCProvider.v6: ReadStateBytes: received %d bytes but expected the total bytes to be %d.", buf.Len(), expectedTotalLength) + + err = fmt.Errorf("expected state file of total %d bytes, received %d bytes", + expectedTotalLength, buf.Len()) + resp.Diagnostics = resp.Diagnostics.Append(err) + return resp + } + + // We're done, so close the stream + logger.Trace("GRPCProvider.v6: ReadStateBytes: received all chunks, total bytes: ", buf.Len()) + err = client.CloseSend() + if err != nil { + resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err)) + return resp + } + + // Add the state data in the response once we know there are no errors + resp.Bytes = buf.Bytes() + + return resp +} + +func (p *GRPCProvider) WriteStateBytes(r providers.WriteStateBytesRequest) (resp providers.WriteStateBytesResponse) { + logger.Trace("GRPCProvider.v6: WriteStateBytes") + + // WriteStateBytes can be more sensitive to message sizes + // so we ensure it aligns with (the lower) terraform-plugin-go. + opts := grpc.MaxSendMsgSizeCallOption{ + MaxSendMsgSize: grpcMaxMessageSize, + } + + chunkSize, ok := p.stateChunkSize[r.TypeName] + if !ok { + resp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf("Unable to determine chunk size for provider %s; this is a bug in Terraform - please report it", r.TypeName)) + return resp + } + + schema := p.GetProviderSchema() + if schema.Diagnostics.HasErrors() { + resp.Diagnostics = schema.Diagnostics + return resp + } + + if _, ok := schema.StateStores[r.TypeName]; !ok { + resp.Diagnostics = resp.Diagnostics.Append(fmt.Errorf("unknown state store type %q", r.TypeName)) + return resp + } + + // Start the streaming RPC with a context. The context will be cancelled + // when this function returns, which will stop the stream if it is still + // running. + ctx, cancel := context.WithCancel(p.ctx) + defer cancel() + + client, err := p.client.WriteStateBytes(ctx, opts) + if err != nil { + resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err)) + return resp + } + + buf := bytes.NewBuffer(r.Bytes) + var totalLength int64 = int64(len(r.Bytes)) + var totalBytesProcessed int + for { + chunk := buf.Next(chunkSize) + + if len(chunk) == 0 { + // The previous iteration read the last of the data. Now we finish up. + protoResp, err := client.CloseAndRecv() + if err != nil { + resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err)) + return resp + } + resp.Diagnostics = resp.Diagnostics.Append(convert.ProtoToDiagnostics(protoResp.Diagnostics)) + if resp.Diagnostics.HasErrors() { + return resp + } + break + } + + var meta *proto6.RequestChunkMeta + if totalBytesProcessed == 0 { + // Send metadata with the first chunk only + meta = &proto6.RequestChunkMeta{ + TypeName: r.TypeName, + StateId: r.StateId, + } + } + + // There is more data to write + protoReq := &proto6.WriteStateBytes_RequestChunk{ + Meta: meta, + Bytes: chunk, + TotalLength: totalLength, + Range: &proto6.StateRange{ + Start: int64(totalBytesProcessed), + End: int64(totalBytesProcessed + len(chunk)), + }, + } + err = client.Send(protoReq) + if err != nil { + resp.Diagnostics = resp.Diagnostics.Append(grpcErr(err)) + return resp + } + + // Track progress before next iteration + totalBytesProcessed += len(chunk) + } + + return resp +} + +func (p *GRPCProvider) SetStateStoreChunkSize(typeName string, size int) { + p.mu.Lock() + defer p.mu.Unlock() + if p.stateChunkSize == nil { + p.stateChunkSize = make(map[string]int, 1) + } + p.stateChunkSize[typeName] = size +} + func (p *GRPCProvider) GetStates(r providers.GetStatesRequest) (resp providers.GetStatesResponse) { logger.Trace("GRPCProvider.v6: GetStates") @@ -1758,3 +2000,15 @@ func clientCapabilitiesToProto(c providers.ClientCapabilities) *proto6.ClientCap WriteOnlyAttributesAllowed: c.WriteOnlyAttributesAllowed, } } + +func stateStoreClientCapabilitiesToProto(c providers.StateStoreClientCapabilities) *proto6.StateStoreClientCapabilities { + return &proto6.StateStoreClientCapabilities{ + ChunkSize: c.ChunkSize, + } +} + +func stateStoreServerCapabilitiesFromProto(c *proto6.StateStoreServerCapabilities) providers.StateStoreServerCapabilities { + return providers.StateStoreServerCapabilities{ + ChunkSize: c.ChunkSize, + } +} diff --git a/internal/plugin6/grpc_provider_test.go b/internal/plugin6/grpc_provider_test.go index 44fb722dcff3..226fb1578d35 100644 --- a/internal/plugin6/grpc_provider_test.go +++ b/internal/plugin6/grpc_provider_test.go @@ -6,6 +6,7 @@ package plugin6 import ( "bytes" "context" + "errors" "fmt" "io" "testing" @@ -20,6 +21,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" "github.com/hashicorp/terraform/internal/addrs" + "github.com/hashicorp/terraform/internal/backend" "github.com/hashicorp/terraform/internal/configs/configschema" "github.com/hashicorp/terraform/internal/configs/hcl2shim" "github.com/hashicorp/terraform/internal/plans" @@ -60,6 +62,16 @@ func mockProviderClient(t *testing.T) *mockproto.MockProviderClient { return client } +func mockReadStateBytesClient(t *testing.T) *mockproto.MockProvider_ReadStateBytesClient { + ctrl := gomock.NewController(t) + return mockproto.NewMockProvider_ReadStateBytesClient(ctrl) +} + +func mockWriteStateBytesClient(t *testing.T) *mockproto.MockProvider_WriteStateBytesClient { + ctrl := gomock.NewController(t) + return mockproto.NewMockProvider_WriteStateBytesClient(ctrl) +} + func checkDiags(t *testing.T, d tfdiags.Diagnostics) { t.Helper() if d.HasErrors() { @@ -2277,6 +2289,7 @@ func TestGRPCProvider_ValidateStateStoreConfig_schema_errors(t *testing.T) { func TestGRPCProvider_ConfigureStateStore_returns_validation_errors(t *testing.T) { storeName := "mock_store" // mockProviderClient returns a mock that has this state store in its schemas + chunkSize := 4 << 20 // 4MB t.Run("no validation error raised", func(t *testing.T) { typeName := storeName @@ -2292,6 +2305,9 @@ func TestGRPCProvider_ConfigureStateStore_returns_validation_errors(t *testing.T gomock.Any(), gomock.Any(), ).Return(&proto.ConfigureStateStore_Response{ + Capabilities: &proto.StateStoreServerCapabilities{ + ChunkSize: int64(chunkSize), + }, Diagnostics: diagnostic, }, nil) @@ -2300,6 +2316,9 @@ func TestGRPCProvider_ConfigureStateStore_returns_validation_errors(t *testing.T Config: cty.ObjectVal(map[string]cty.Value{ "region": cty.StringVal("neptune"), }), + Capabilities: providers.StateStoreClientCapabilities{ + ChunkSize: int64(chunkSize), + }, } // Act @@ -2330,6 +2349,9 @@ func TestGRPCProvider_ConfigureStateStore_returns_validation_errors(t *testing.T gomock.Any(), gomock.Any(), ).Return(&proto.ConfigureStateStore_Response{ + Capabilities: &proto.StateStoreServerCapabilities{ + ChunkSize: int64(chunkSize), + }, Diagnostics: diagnostic, }, nil) @@ -2338,6 +2360,9 @@ func TestGRPCProvider_ConfigureStateStore_returns_validation_errors(t *testing.T Config: cty.ObjectVal(map[string]cty.Value{ "region": cty.StringVal("neptune"), }), + Capabilities: providers.StateStoreClientCapabilities{ + ChunkSize: int64(chunkSize), + }, } // Act @@ -2556,3 +2581,787 @@ func TestGRPCProvider_DeleteState(t *testing.T) { } }) } + +func TestGRPCProvider_ReadStateBytes(t *testing.T) { + chunkSize := 4 << 20 // 4MB + + t.Run("can process multiple chunks", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", 5) + + // Call to ReadStateBytes + // > Assert the arguments received + // > Define the returned mock client + expectedReq := &proto.ReadStateBytes_Request{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + } + mockReadBytesClient := mockReadStateBytesClient(t) + client.EXPECT().ReadStateBytes( + gomock.Any(), + gomock.Eq(expectedReq), + gomock.Any(), + ).Return(mockReadBytesClient, nil) + + // Define what will be returned by each call to Recv + chunks := []string{"hello", "world"} + totalLength := len(chunks[0]) + len(chunks[1]) + mockResp := map[int]struct { + resp *proto.ReadStateBytes_Response + err error + }{ + 0: { + resp: &proto.ReadStateBytes_Response{ + Bytes: []byte(chunks[0]), + TotalLength: int64(totalLength), + Range: &proto.StateRange{ + Start: 0, + End: int64(len(chunks[0])), + }, + }, + err: nil, + }, + 1: { + resp: &proto.ReadStateBytes_Response{ + Bytes: []byte(chunks[1]), + TotalLength: int64(totalLength), + Range: &proto.StateRange{ + Start: int64(len(chunks[0])), + End: int64(len(chunks[1])), + }, + }, + err: nil, + }, + 2: { + resp: &proto.ReadStateBytes_Response{}, + err: io.EOF, + }, + } + var count int + mockReadBytesClient.EXPECT().Recv().DoAndReturn(func() (*proto.ReadStateBytes_Response, error) { + ret := mockResp[count] + count++ + return ret.resp, ret.err + }).Times(3) + + // There will be a call to CloseSend to close the stream + mockReadBytesClient.EXPECT().CloseSend().Return(nil).Times(1) + + // Act + request := providers.ReadStateBytesRequest{ + TypeName: expectedReq.TypeName, + StateId: expectedReq.StateId, + } + resp := p.ReadStateBytes(request) + + // Assert returned values + checkDiags(t, resp.Diagnostics) + if string(resp.Bytes) != "helloworld" { + t.Fatalf("expected data to be %q, got: %q", "helloworld", string(resp.Bytes)) + } + }) + + t.Run("an error diagnostic is returned when final length does not match expectations", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", 5) + + // Call to ReadStateBytes + // > Assert the arguments received + // > Define the returned mock client + mockReadBytesClient := mockReadStateBytesClient(t) + expectedReq := &proto.ReadStateBytes_Request{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + } + client.EXPECT().ReadStateBytes( + gomock.Any(), + gomock.Eq(expectedReq), + gomock.Any(), + ).Return(mockReadBytesClient, nil) + + // Define what will be returned by each call to Recv + chunks := []string{"hello", "world"} + var incorrectLength int64 = 999 + correctLength := len(chunks[0]) + len(chunks[1]) + mockResp := map[int]struct { + resp *proto.ReadStateBytes_Response + err error + }{ + 0: { + resp: &proto.ReadStateBytes_Response{ + Bytes: []byte(chunks[0]), + TotalLength: incorrectLength, + Range: &proto.StateRange{ + Start: 0, + End: int64(len(chunks[0])), + }, + }, + err: nil, + }, + 1: { + resp: &proto.ReadStateBytes_Response{ + Bytes: []byte(chunks[1]), + TotalLength: incorrectLength, + Range: &proto.StateRange{ + Start: int64(len(chunks[0])), + End: int64(len(chunks[1])), + }, + }, + err: nil, + }, + 2: { + resp: &proto.ReadStateBytes_Response{}, + err: io.EOF, + }, + } + var count int + mockReadBytesClient.EXPECT().Recv().DoAndReturn(func() (*proto.ReadStateBytes_Response, error) { + ret := mockResp[count] + count++ + return ret.resp, ret.err + }).Times(3) + + // Act + request := providers.ReadStateBytesRequest{ + TypeName: expectedReq.TypeName, + StateId: expectedReq.StateId, + } + resp := p.ReadStateBytes(request) + + // Assert returned values + checkDiagsHasError(t, resp.Diagnostics) + expectedErr := fmt.Sprintf("expected state file of total %d bytes, received %d bytes", incorrectLength, correctLength) + if resp.Diagnostics.Err().Error() != expectedErr { + t.Fatalf("expected error diagnostic %q, but got: %q", expectedErr, resp.Diagnostics.Err()) + } + if len(resp.Bytes) != 0 { + t.Fatalf("expected data to be omitted in error condition, but got: %q", string(resp.Bytes)) + } + }) + + t.Run("an error diagnostic is returned when store type does not exist", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // In this scenario the method returns before the call to the + // ReadStateBytes RPC, so no mocking needed + + badStoreType := "doesnt_exist" + request := providers.ReadStateBytesRequest{ + TypeName: badStoreType, + StateId: backend.DefaultStateName, + } + + // Act + resp := p.ReadStateBytes(request) + + // Assert returned values + checkDiagsHasError(t, resp.Diagnostics) + expectedErr := fmt.Sprintf("unknown state store type %q", badStoreType) + if resp.Diagnostics.Err().Error() != expectedErr { + t.Fatalf("expected error diagnostic %q, but got: %q", expectedErr, resp.Diagnostics.Err()) + } + if len(resp.Bytes) != 0 { + t.Fatalf("expected data to be omitted in error condition, but got: %q", string(resp.Bytes)) + } + }) + + t.Run("error diagnostics from the provider are returned", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // Call to ReadStateBytes + // > Assert the arguments received + // > Define the returned mock client + mockReadBytesClient := mockReadStateBytesClient(t) + + expectedReq := &proto.ReadStateBytes_Request{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + } + client.EXPECT().ReadStateBytes( + gomock.Any(), + gomock.Eq(expectedReq), + gomock.Any(), + ).Return(mockReadBytesClient, nil) + + // Define what will be returned by each call to Recv + mockReadBytesClient.EXPECT().Recv().Return(&proto.ReadStateBytes_Response{ + Diagnostics: []*proto.Diagnostic{ + { + Severity: proto.Diagnostic_ERROR, + Summary: "Error from test", + Detail: "This error is forced by the test case", + }, + }, + }, nil) + + // Act + request := providers.ReadStateBytesRequest{ + TypeName: expectedReq.TypeName, + StateId: expectedReq.StateId, + } + resp := p.ReadStateBytes(request) + + // Assert returned values + checkDiagsHasError(t, resp.Diagnostics) + expectedErr := "Error from test: This error is forced by the test case" + if resp.Diagnostics.Err().Error() != expectedErr { + t.Fatalf("expected error diagnostic %q, but got: %q", expectedErr, resp.Diagnostics.Err()) + } + if len(resp.Bytes) != 0 { + t.Fatalf("expected data to be omitted in error condition, but got: %q", string(resp.Bytes)) + } + }) + + t.Run("warning diagnostics from the provider are returned", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // Call to ReadStateBytes + // > Assert the arguments received + // > Define the returned mock client + mockReadBytesClient := mockReadStateBytesClient(t) + + expectedReq := &proto.ReadStateBytes_Request{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + } + client.EXPECT().ReadStateBytes( + gomock.Any(), + gomock.Eq(expectedReq), + gomock.Any(), + ).Return(mockReadBytesClient, nil) + + // Define what will be returned by each call to Recv + chunk := "hello world" + totalLength := len(chunk) + mockResp := map[int]struct { + resp *proto.ReadStateBytes_Response + err error + }{ + 0: { + resp: &proto.ReadStateBytes_Response{ + Bytes: []byte(chunk), + TotalLength: int64(totalLength), + Range: &proto.StateRange{ + Start: 0, + End: int64(len(chunk)), + }, + Diagnostics: []*proto.Diagnostic{ + { + Severity: proto.Diagnostic_WARNING, + Summary: "Warning from test", + Detail: "This warning is forced by the test case", + }, + }, + }, + err: nil, + }, + 1: { + resp: &proto.ReadStateBytes_Response{}, + err: io.EOF, + }, + } + var count int + mockReadBytesClient.EXPECT().Recv().DoAndReturn(func() (*proto.ReadStateBytes_Response, error) { + ret := mockResp[count] + count++ + return ret.resp, ret.err + }).Times(2) + + // There will be a call to CloseSend to close the stream + mockReadBytesClient.EXPECT().CloseSend().Return(nil).Times(1) + + // Act + request := providers.ReadStateBytesRequest{ + TypeName: expectedReq.TypeName, + StateId: expectedReq.StateId, + } + resp := p.ReadStateBytes(request) + + // Assert returned values + checkDiags(t, resp.Diagnostics) + expectedWarn := "Warning from test: This warning is forced by the test case" + if resp.Diagnostics.ErrWithWarnings().Error() != expectedWarn { + t.Fatalf("expected warning diagnostic %q, but got: %q", expectedWarn, resp.Diagnostics.ErrWithWarnings().Error()) + } + if len(resp.Bytes) == 0 { + t.Fatal("expected data to included despite warnings, but got no bytes") + } + }) + + t.Run("when reading data, grpc errors are surfaced via diagnostics", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // Call to ReadStateBytes + // > Assert the arguments received + // > Define the returned mock client + mockClient := mockReadStateBytesClient(t) + expectedReq := &proto.ReadStateBytes_Request{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + } + client.EXPECT().ReadStateBytes( + gomock.Any(), + gomock.Eq(expectedReq), + gomock.Any(), + ).Return(mockClient, nil) + + mockError := errors.New("grpc error forced in test") + mockClient.EXPECT().Recv().Return(&proto.ReadStateBytes_Response{}, mockError) + + // Act + request := providers.ReadStateBytesRequest{ + TypeName: expectedReq.TypeName, + StateId: expectedReq.StateId, + } + resp := p.ReadStateBytes(request) + + // Assert returned values + checkDiagsHasError(t, resp.Diagnostics) + wantErr := fmt.Sprintf("Plugin error: The plugin returned an unexpected error from plugin6.(*GRPCProvider).ReadStateBytes: %s", mockError) + if resp.Diagnostics.Err().Error() != wantErr { + t.Fatalf("expected error diagnostic %q, but got: %q", wantErr, resp.Diagnostics.Err()) + } + if len(resp.Bytes) != 0 { + t.Fatalf("expected data to be omitted in error condition, but got: %q", string(resp.Bytes)) + } + }) + + t.Run("when closing the stream, grpc errors are surfaced via diagnostics", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // Call to ReadStateBytes + // > Assert the arguments received + // > Define the returned mock client + mockClient := mockReadStateBytesClient(t) + expectedReq := &proto.ReadStateBytes_Request{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + } + client.EXPECT().ReadStateBytes( + gomock.Any(), + gomock.Eq(expectedReq), + gomock.Any(), + ).Return(mockClient, nil) + + // Sufficient mocking of Recv to get to the call to CloseSend + mockClient.EXPECT().Recv().Return(&proto.ReadStateBytes_Response{}, io.EOF) + + // Force a gRPC error from CloseSend + mockError := errors.New("grpc error forced in test") + mockClient.EXPECT().CloseSend().Return(mockError).Times(1) + + // Act + request := providers.ReadStateBytesRequest{ + TypeName: expectedReq.TypeName, + StateId: expectedReq.StateId, + } + resp := p.ReadStateBytes(request) + + // Assert returned values + checkDiagsHasError(t, resp.Diagnostics) + wantErr := fmt.Sprintf("Plugin error: The plugin returned an unexpected error from plugin6.(*GRPCProvider).ReadStateBytes: %s", mockError) + if resp.Diagnostics.Err().Error() != wantErr { + t.Fatalf("expected error diagnostic %q, but got: %q", wantErr, resp.Diagnostics.Err()) + } + if len(resp.Bytes) != 0 { + t.Fatalf("expected data to be omitted in error condition, but got: %q", string(resp.Bytes)) + } + }) + + t.Run("when reading the data, warnings are raised when chunk sizes mismatch", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", 5) + + // Call to ReadStateBytes + // > Assert the arguments received + // > Define the returned mock client + mockReadBytesClient := mockReadStateBytesClient(t) + + expectedReq := &proto.ReadStateBytes_Request{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + } + client.EXPECT().ReadStateBytes( + gomock.Any(), + gomock.Eq(expectedReq), + gomock.Any(), + ).Return(mockReadBytesClient, nil) + + // Define what will be returned by each call to Recv + chunk := "helloworld" + totalLength := len(chunk) + mockResp := map[int]struct { + resp *proto.ReadStateBytes_Response + err error + }{ + 0: { + resp: &proto.ReadStateBytes_Response{ + Bytes: []byte(chunk[:4]), + TotalLength: int64(totalLength), + Range: &proto.StateRange{ + Start: 0, + End: 4, + }, + Diagnostics: []*proto.Diagnostic{}, + }, + err: nil, + }, + 1: { + resp: &proto.ReadStateBytes_Response{ + Bytes: []byte(chunk[4:]), + TotalLength: int64(totalLength), + Range: &proto.StateRange{ + Start: 4, + End: 10, + }, + Diagnostics: []*proto.Diagnostic{}, + }, + err: nil, + }, + 2: { + resp: &proto.ReadStateBytes_Response{}, + err: io.EOF, + }, + } + var count int + mockReadBytesClient.EXPECT().Recv().DoAndReturn(func() (*proto.ReadStateBytes_Response, error) { + ret := mockResp[count] + count++ + return ret.resp, ret.err + }).Times(3) + + // There will be a call to CloseSend to close the stream + mockReadBytesClient.EXPECT().CloseSend().Return(nil).Times(1) + + // Act + request := providers.ReadStateBytesRequest{ + TypeName: expectedReq.TypeName, + StateId: expectedReq.StateId, + } + resp := p.ReadStateBytes(request) + + // Assert returned values + checkDiags(t, resp.Diagnostics) + expectedWarn := `2 warnings: + +- Unexpected size of chunk received: Unexpected chunk of size 4 was received, expected 5; this is a bug in the provider mock_store - please report it there +- Unexpected size of last chunk received: Last chunk exceeded agreed size, expected 5, given 6; this is a bug in the provider mock_store - please report it there` + if resp.Diagnostics.ErrWithWarnings().Error() != expectedWarn { + t.Fatalf("expected warning diagnostic %q, but got: %q", expectedWarn, resp.Diagnostics.ErrWithWarnings().Error()) + } + if len(resp.Bytes) != 10 { + t.Fatalf("expected 10 bytes to be read despite warnings, but got %d", len(resp.Bytes)) + } + }) +} + +func TestGRPCProvider_WriteStateBytes(t *testing.T) { + chunkSize := 4 << 20 // 4MB + + t.Run("data smaller than the chunk size is sent in one write action", func(t *testing.T) { + // Less than 4MB + data := []byte("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod" + + "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud" + + " exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor" + + " in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint" + + " occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.") + + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // Assert there will be a call to WriteStateBytes + // & make it return the mock client + mockWriteClient := mockWriteStateBytesClient(t) + client.EXPECT().WriteStateBytes( + gomock.Any(), + gomock.Any(), + ).Return(mockWriteClient, nil) + + // Spy on arguments passed to the Send method of the client + // + // We expect 1 call to Send as the total data + // is less than the chunk size + expectedReq := &proto.WriteStateBytes_RequestChunk{ + Meta: &proto.RequestChunkMeta{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + }, + Bytes: data, + TotalLength: int64(len(data)), + Range: &proto.StateRange{ + Start: 0, + End: int64(len(data)), + }, + } + mockWriteClient.EXPECT().Send(gomock.Eq(expectedReq)).Times(1).Return(nil) + mockWriteClient.EXPECT().CloseAndRecv().Times(1).Return(&proto.WriteStateBytes_Response{}, nil) + + // Act + request := providers.WriteStateBytesRequest{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + Bytes: data, + } + resp := p.WriteStateBytes(request) + + // Assert returned values + checkDiags(t, resp.Diagnostics) + }) + + t.Run("data larger than the chunk size is sent in multiple write actions", func(t *testing.T) { + // Make a buffer that can contain 10 bytes more than the 4MB chunk size + chunkSize := 4 * 1_000_000 + dataBuff := bytes.NewBuffer(make([]byte, 0, chunkSize+10)) + dataBuffCopy := bytes.NewBuffer(make([]byte, 0, chunkSize+10)) + for i := 0; i < (chunkSize + 10); i++ { + dataBuff.WriteByte(63) // We're making 4MB + 10 bytes of question marks because why not + dataBuffCopy.WriteByte(63) // Used to make assertions + } + data := dataBuff.Bytes() + dataFirstChunk := dataBuffCopy.Next(chunkSize) // First write will have a full chunk + dataSecondChunk := dataBuffCopy.Next(chunkSize) // This will be the extra 10 bytes + + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // Assert there will be a call to WriteStateBytes + // & make it return the mock client + mockWriteClient := mockWriteStateBytesClient(t) + client.EXPECT().WriteStateBytes( + gomock.Any(), + gomock.Any(), + ).Return(mockWriteClient, nil) + + // Spy on arguments passed to the Send method because data + // is written via separate chunks and separate calls to Send. + // + // We expect 2 calls to Send as the total data + // is 10 bytes larger than the chunk size + req1 := &proto.WriteStateBytes_RequestChunk{ + Meta: &proto.RequestChunkMeta{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + }, + Bytes: dataFirstChunk, + TotalLength: int64(len(data)), + Range: &proto.StateRange{ + Start: 0, + End: int64(chunkSize), + }, + } + req2 := &proto.WriteStateBytes_RequestChunk{ + Meta: nil, + Bytes: dataSecondChunk, + TotalLength: int64(len(data)), + Range: &proto.StateRange{ + Start: int64(chunkSize), + End: int64(chunkSize + 10), + }, + } + mockWriteClient.EXPECT().Send(gomock.AnyOf(req1, req2)).Times(2).Return(nil) + mockWriteClient.EXPECT().CloseAndRecv().Times(1).Return(&proto.WriteStateBytes_Response{}, nil) + + // Act + request := providers.WriteStateBytesRequest{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + Bytes: data, + } + resp := p.WriteStateBytes(request) + + // Assert returned values + checkDiags(t, resp.Diagnostics) + }) + + t.Run("when writing data, grpc errors are surfaced via diagnostics", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // Assert there will be a call to WriteStateBytes + // & make it return the mock client + mockWriteClient := mockWriteStateBytesClient(t) + client.EXPECT().WriteStateBytes( + gomock.Any(), + gomock.Any(), + ).Return(mockWriteClient, nil) + + mockError := errors.New("grpc error forced in test") + mockWriteClient.EXPECT().Send(gomock.Any()).Return(mockError) + + // Act + request := providers.WriteStateBytesRequest{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + Bytes: []byte("helloworld"), + } + resp := p.WriteStateBytes(request) + + // Assert returned values + checkDiagsHasError(t, resp.Diagnostics) + wantErr := fmt.Sprintf("Plugin error: The plugin returned an unexpected error from plugin6.(*GRPCProvider).WriteStateBytes: %s", mockError) + if resp.Diagnostics.Err().Error() != wantErr { + t.Fatalf("unexpected error, wanted %q, got: %s", wantErr, resp.Diagnostics.Err()) + } + }) + + t.Run("error diagnostics from the provider when closing the connection are returned", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // Assert there will be a call to WriteStateBytes + // & make it return the mock client + mockWriteClient := mockWriteStateBytesClient(t) + client.EXPECT().WriteStateBytes( + gomock.Any(), + gomock.Any(), + ).Return(mockWriteClient, nil) + + data := []byte("helloworld") + mockReq := &proto.WriteStateBytes_RequestChunk{ + Meta: &proto.RequestChunkMeta{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + }, + Bytes: data, + TotalLength: int64(len(data)), + Range: &proto.StateRange{ + Start: 0, + End: int64(len(data)), + }, + } + mockResp := &proto.WriteStateBytes_Response{ + Diagnostics: []*proto.Diagnostic{ + { + Severity: proto.Diagnostic_ERROR, + Summary: "Error from test mock", + Detail: "This error is returned from the test mock", + }, + }, + } + mockWriteClient.EXPECT().Send(gomock.Eq(mockReq)).Times(1).Return(nil) + mockWriteClient.EXPECT().CloseAndRecv().Times(1).Return(mockResp, nil) + + // Act + request := providers.WriteStateBytesRequest{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + Bytes: data, + } + resp := p.WriteStateBytes(request) + + // Assert returned values + checkDiagsHasError(t, resp.Diagnostics) + if resp.Diagnostics.Err().Error() != "Error from test mock: This error is returned from the test mock" { + t.Fatal() + } + }) + + t.Run("warning diagnostics from the provider when closing the connection are returned", func(t *testing.T) { + client := mockProviderClient(t) + p := &GRPCProvider{ + client: client, + ctx: context.Background(), + } + p.SetStateStoreChunkSize("mock_store", chunkSize) + + // Assert there will be a call to WriteStateBytes + // & make it return the mock client + mockWriteClient := mockWriteStateBytesClient(t) + client.EXPECT().WriteStateBytes( + gomock.Any(), + gomock.Any(), + ).Return(mockWriteClient, nil) + + data := []byte("helloworld") + mockReq := &proto.WriteStateBytes_RequestChunk{ + Meta: &proto.RequestChunkMeta{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + }, + Bytes: data, + TotalLength: int64(len(data)), + Range: &proto.StateRange{ + Start: 0, + End: int64(len(data)), + }, + } + mockResp := &proto.WriteStateBytes_Response{ + Diagnostics: []*proto.Diagnostic{ + { + Severity: proto.Diagnostic_WARNING, + Summary: "Warning from test mock", + Detail: "This warning is returned from the test mock", + }, + }, + } + mockWriteClient.EXPECT().Send(gomock.Eq(mockReq)).Times(1).Return(nil) + mockWriteClient.EXPECT().CloseAndRecv().Times(1).Return(mockResp, nil) + + // Act + request := providers.WriteStateBytesRequest{ + TypeName: "mock_store", + StateId: backend.DefaultStateName, + Bytes: data, + } + resp := p.WriteStateBytes(request) + + // Assert returned values + checkDiags(t, resp.Diagnostics) + if resp.Diagnostics.ErrWithWarnings().Error() != "Warning from test mock: This warning is returned from the test mock" { + t.Fatal() + } + }) +} diff --git a/internal/plugin6/mock_proto/generate.go b/internal/plugin6/mock_proto/generate.go index 36cc550081ce..4d7f823b94ae 100644 --- a/internal/plugin6/mock_proto/generate.go +++ b/internal/plugin6/mock_proto/generate.go @@ -1,6 +1,6 @@ // Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: BUSL-1.1 -//go:generate go tool go.uber.org/mock/mockgen -destination mock.go github.com/hashicorp/terraform/internal/tfplugin6 ProviderClient,Provider_InvokeActionClient +//go:generate go tool go.uber.org/mock/mockgen -destination mock.go github.com/hashicorp/terraform/internal/tfplugin6 ProviderClient,Provider_InvokeActionClient,Provider_ReadStateBytesClient,Provider_WriteStateBytesClient package mock_tfplugin6 diff --git a/internal/plugin6/mock_proto/mock.go b/internal/plugin6/mock_proto/mock.go index 9e922a0fce74..8853386f341c 100644 --- a/internal/plugin6/mock_proto/mock.go +++ b/internal/plugin6/mock_proto/mock.go @@ -1,9 +1,9 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/hashicorp/terraform/internal/tfplugin6 (interfaces: ProviderClient,Provider_InvokeActionClient) +// Source: github.com/hashicorp/terraform/internal/tfplugin6 (interfaces: ProviderClient,Provider_InvokeActionClient,Provider_ReadStateBytesClient,Provider_WriteStateBytesClient) // // Generated by this command: // -// mockgen -destination mock.go github.com/hashicorp/terraform/internal/tfplugin6 ProviderClient,Provider_InvokeActionClient +// mockgen -destination mock.go github.com/hashicorp/terraform/internal/tfplugin6 ProviderClient,Provider_InvokeActionClient,Provider_ReadStateBytesClient,Provider_WriteStateBytesClient // // Package mock_tfplugin6 is a generated GoMock package. @@ -463,6 +463,26 @@ func (mr *MockProviderClientMockRecorder) ReadResource(ctx, in any, opts ...any) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadResource", reflect.TypeOf((*MockProviderClient)(nil).ReadResource), varargs...) } +// ReadStateBytes mocks base method. +func (m *MockProviderClient) ReadStateBytes(ctx context.Context, in *tfplugin6.ReadStateBytes_Request, opts ...grpc.CallOption) (tfplugin6.Provider_ReadStateBytesClient, error) { + m.ctrl.T.Helper() + varargs := []any{ctx, in} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ReadStateBytes", varargs...) + ret0, _ := ret[0].(tfplugin6.Provider_ReadStateBytesClient) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ReadStateBytes indicates an expected call of ReadStateBytes. +func (mr *MockProviderClientMockRecorder) ReadStateBytes(ctx, in any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, in}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReadStateBytes", reflect.TypeOf((*MockProviderClient)(nil).ReadStateBytes), varargs...) +} + // RenewEphemeralResource mocks base method. func (m *MockProviderClient) RenewEphemeralResource(ctx context.Context, in *tfplugin6.RenewEphemeralResource_Request, opts ...grpc.CallOption) (*tfplugin6.RenewEphemeralResource_Response, error) { m.ctrl.T.Helper() @@ -683,6 +703,26 @@ func (mr *MockProviderClientMockRecorder) ValidateStateStoreConfig(ctx, in any, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateStateStoreConfig", reflect.TypeOf((*MockProviderClient)(nil).ValidateStateStoreConfig), varargs...) } +// WriteStateBytes mocks base method. +func (m *MockProviderClient) WriteStateBytes(ctx context.Context, opts ...grpc.CallOption) (tfplugin6.Provider_WriteStateBytesClient, error) { + m.ctrl.T.Helper() + varargs := []any{ctx} + for _, a := range opts { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "WriteStateBytes", varargs...) + ret0, _ := ret[0].(tfplugin6.Provider_WriteStateBytesClient) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// WriteStateBytes indicates an expected call of WriteStateBytes. +func (mr *MockProviderClientMockRecorder) WriteStateBytes(ctx any, opts ...any) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx}, opts...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WriteStateBytes", reflect.TypeOf((*MockProviderClient)(nil).WriteStateBytes), varargs...) +} + // MockProvider_InvokeActionClient is a mock of Provider_InvokeActionClient interface. type MockProvider_InvokeActionClient struct { ctrl *gomock.Controller @@ -806,3 +846,265 @@ func (mr *MockProvider_InvokeActionClientMockRecorder) Trailer() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockProvider_InvokeActionClient)(nil).Trailer)) } + +// MockProvider_ReadStateBytesClient is a mock of Provider_ReadStateBytesClient interface. +type MockProvider_ReadStateBytesClient struct { + ctrl *gomock.Controller + recorder *MockProvider_ReadStateBytesClientMockRecorder + isgomock struct{} +} + +// MockProvider_ReadStateBytesClientMockRecorder is the mock recorder for MockProvider_ReadStateBytesClient. +type MockProvider_ReadStateBytesClientMockRecorder struct { + mock *MockProvider_ReadStateBytesClient +} + +// NewMockProvider_ReadStateBytesClient creates a new mock instance. +func NewMockProvider_ReadStateBytesClient(ctrl *gomock.Controller) *MockProvider_ReadStateBytesClient { + mock := &MockProvider_ReadStateBytesClient{ctrl: ctrl} + mock.recorder = &MockProvider_ReadStateBytesClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockProvider_ReadStateBytesClient) EXPECT() *MockProvider_ReadStateBytesClientMockRecorder { + return m.recorder +} + +// CloseSend mocks base method. +func (m *MockProvider_ReadStateBytesClient) CloseSend() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CloseSend") + ret0, _ := ret[0].(error) + return ret0 +} + +// CloseSend indicates an expected call of CloseSend. +func (mr *MockProvider_ReadStateBytesClientMockRecorder) CloseSend() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockProvider_ReadStateBytesClient)(nil).CloseSend)) +} + +// Context mocks base method. +func (m *MockProvider_ReadStateBytesClient) Context() context.Context { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Context") + ret0, _ := ret[0].(context.Context) + return ret0 +} + +// Context indicates an expected call of Context. +func (mr *MockProvider_ReadStateBytesClientMockRecorder) Context() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockProvider_ReadStateBytesClient)(nil).Context)) +} + +// Header mocks base method. +func (m *MockProvider_ReadStateBytesClient) Header() (metadata.MD, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Header") + ret0, _ := ret[0].(metadata.MD) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Header indicates an expected call of Header. +func (mr *MockProvider_ReadStateBytesClientMockRecorder) Header() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockProvider_ReadStateBytesClient)(nil).Header)) +} + +// Recv mocks base method. +func (m *MockProvider_ReadStateBytesClient) Recv() (*tfplugin6.ReadStateBytes_Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Recv") + ret0, _ := ret[0].(*tfplugin6.ReadStateBytes_Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Recv indicates an expected call of Recv. +func (mr *MockProvider_ReadStateBytesClientMockRecorder) Recv() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockProvider_ReadStateBytesClient)(nil).Recv)) +} + +// RecvMsg mocks base method. +func (m_2 *MockProvider_ReadStateBytesClient) RecvMsg(m any) error { + m_2.ctrl.T.Helper() + ret := m_2.ctrl.Call(m_2, "RecvMsg", m) + ret0, _ := ret[0].(error) + return ret0 +} + +// RecvMsg indicates an expected call of RecvMsg. +func (mr *MockProvider_ReadStateBytesClientMockRecorder) RecvMsg(m any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockProvider_ReadStateBytesClient)(nil).RecvMsg), m) +} + +// SendMsg mocks base method. +func (m_2 *MockProvider_ReadStateBytesClient) SendMsg(m any) error { + m_2.ctrl.T.Helper() + ret := m_2.ctrl.Call(m_2, "SendMsg", m) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendMsg indicates an expected call of SendMsg. +func (mr *MockProvider_ReadStateBytesClientMockRecorder) SendMsg(m any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockProvider_ReadStateBytesClient)(nil).SendMsg), m) +} + +// Trailer mocks base method. +func (m *MockProvider_ReadStateBytesClient) Trailer() metadata.MD { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Trailer") + ret0, _ := ret[0].(metadata.MD) + return ret0 +} + +// Trailer indicates an expected call of Trailer. +func (mr *MockProvider_ReadStateBytesClientMockRecorder) Trailer() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockProvider_ReadStateBytesClient)(nil).Trailer)) +} + +// MockProvider_WriteStateBytesClient is a mock of Provider_WriteStateBytesClient interface. +type MockProvider_WriteStateBytesClient struct { + ctrl *gomock.Controller + recorder *MockProvider_WriteStateBytesClientMockRecorder + isgomock struct{} +} + +// MockProvider_WriteStateBytesClientMockRecorder is the mock recorder for MockProvider_WriteStateBytesClient. +type MockProvider_WriteStateBytesClientMockRecorder struct { + mock *MockProvider_WriteStateBytesClient +} + +// NewMockProvider_WriteStateBytesClient creates a new mock instance. +func NewMockProvider_WriteStateBytesClient(ctrl *gomock.Controller) *MockProvider_WriteStateBytesClient { + mock := &MockProvider_WriteStateBytesClient{ctrl: ctrl} + mock.recorder = &MockProvider_WriteStateBytesClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockProvider_WriteStateBytesClient) EXPECT() *MockProvider_WriteStateBytesClientMockRecorder { + return m.recorder +} + +// CloseAndRecv mocks base method. +func (m *MockProvider_WriteStateBytesClient) CloseAndRecv() (*tfplugin6.WriteStateBytes_Response, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CloseAndRecv") + ret0, _ := ret[0].(*tfplugin6.WriteStateBytes_Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// CloseAndRecv indicates an expected call of CloseAndRecv. +func (mr *MockProvider_WriteStateBytesClientMockRecorder) CloseAndRecv() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseAndRecv", reflect.TypeOf((*MockProvider_WriteStateBytesClient)(nil).CloseAndRecv)) +} + +// CloseSend mocks base method. +func (m *MockProvider_WriteStateBytesClient) CloseSend() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CloseSend") + ret0, _ := ret[0].(error) + return ret0 +} + +// CloseSend indicates an expected call of CloseSend. +func (mr *MockProvider_WriteStateBytesClientMockRecorder) CloseSend() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockProvider_WriteStateBytesClient)(nil).CloseSend)) +} + +// Context mocks base method. +func (m *MockProvider_WriteStateBytesClient) Context() context.Context { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Context") + ret0, _ := ret[0].(context.Context) + return ret0 +} + +// Context indicates an expected call of Context. +func (mr *MockProvider_WriteStateBytesClientMockRecorder) Context() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockProvider_WriteStateBytesClient)(nil).Context)) +} + +// Header mocks base method. +func (m *MockProvider_WriteStateBytesClient) Header() (metadata.MD, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Header") + ret0, _ := ret[0].(metadata.MD) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Header indicates an expected call of Header. +func (mr *MockProvider_WriteStateBytesClientMockRecorder) Header() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockProvider_WriteStateBytesClient)(nil).Header)) +} + +// RecvMsg mocks base method. +func (m_2 *MockProvider_WriteStateBytesClient) RecvMsg(m any) error { + m_2.ctrl.T.Helper() + ret := m_2.ctrl.Call(m_2, "RecvMsg", m) + ret0, _ := ret[0].(error) + return ret0 +} + +// RecvMsg indicates an expected call of RecvMsg. +func (mr *MockProvider_WriteStateBytesClientMockRecorder) RecvMsg(m any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockProvider_WriteStateBytesClient)(nil).RecvMsg), m) +} + +// Send mocks base method. +func (m *MockProvider_WriteStateBytesClient) Send(arg0 *tfplugin6.WriteStateBytes_RequestChunk) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Send", arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// Send indicates an expected call of Send. +func (mr *MockProvider_WriteStateBytesClientMockRecorder) Send(arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockProvider_WriteStateBytesClient)(nil).Send), arg0) +} + +// SendMsg mocks base method. +func (m_2 *MockProvider_WriteStateBytesClient) SendMsg(m any) error { + m_2.ctrl.T.Helper() + ret := m_2.ctrl.Call(m_2, "SendMsg", m) + ret0, _ := ret[0].(error) + return ret0 +} + +// SendMsg indicates an expected call of SendMsg. +func (mr *MockProvider_WriteStateBytesClientMockRecorder) SendMsg(m any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockProvider_WriteStateBytesClient)(nil).SendMsg), m) +} + +// Trailer mocks base method. +func (m *MockProvider_WriteStateBytesClient) Trailer() metadata.MD { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Trailer") + ret0, _ := ret[0].(metadata.MD) + return ret0 +} + +// Trailer indicates an expected call of Trailer. +func (mr *MockProvider_WriteStateBytesClientMockRecorder) Trailer() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockProvider_WriteStateBytesClient)(nil).Trailer)) +} diff --git a/internal/provider-simple-v6/provider.go b/internal/provider-simple-v6/provider.go index dae2e4a728b4..73085cba1930 100644 --- a/internal/provider-simple-v6/provider.go +++ b/internal/provider-simple-v6/provider.go @@ -317,6 +317,14 @@ func (s simple) ConfigureStateStore(req providers.ConfigureStateStoreRequest) pr panic("not implemented") } +func (s simple) ReadStateBytes(req providers.ReadStateBytesRequest) providers.ReadStateBytesResponse { + panic("not implemented") +} + +func (s simple) WriteStateBytes(req providers.WriteStateBytesRequest) providers.WriteStateBytesResponse { + panic("not implemented") +} + func (s simple) GetStates(req providers.GetStatesRequest) providers.GetStatesResponse { panic("not implemented") } diff --git a/internal/provider-simple/provider.go b/internal/provider-simple/provider.go index 314ca9fcd5b3..55093510b55a 100644 --- a/internal/provider-simple/provider.go +++ b/internal/provider-simple/provider.go @@ -277,6 +277,14 @@ func (s simple) ConfigureStateStore(req providers.ConfigureStateStoreRequest) pr panic("not implemented") } +func (s simple) ReadStateBytes(req providers.ReadStateBytesRequest) providers.ReadStateBytesResponse { + panic("not implemented") +} + +func (s simple) WriteStateBytes(req providers.WriteStateBytesRequest) providers.WriteStateBytesResponse { + panic("not implemented") +} + func (s simple) GetStates(req providers.GetStatesRequest) providers.GetStatesResponse { // provider-simple uses protocol version 5, which does not include the RPC that maps to this method panic("not implemented") diff --git a/internal/providers/mock.go b/internal/providers/mock.go index a5e4005b6c12..1cee9de06f00 100644 --- a/internal/providers/mock.go +++ b/internal/providers/mock.go @@ -436,6 +436,14 @@ func (m *Mock) ConfigureStateStore(req ConfigureStateStoreRequest) ConfigureStat return m.Provider.ConfigureStateStore(req) } +func (m *Mock) ReadStateBytes(req ReadStateBytesRequest) ReadStateBytesResponse { + return m.Provider.ReadStateBytes(req) +} + +func (m *Mock) WriteStateBytes(req WriteStateBytesRequest) WriteStateBytesResponse { + return m.Provider.WriteStateBytes(req) +} + func (m *Mock) GetStates(req GetStatesRequest) GetStatesResponse { return m.Provider.GetStates(req) } diff --git a/internal/providers/provider.go b/internal/providers/provider.go index 579626c3699f..83036bfd3b07 100644 --- a/internal/providers/provider.go +++ b/internal/providers/provider.go @@ -123,6 +123,11 @@ type Interface interface { // ConfigureStateStore configures the state store, such as S3 connection in the context of already configured provider ConfigureStateStore(ConfigureStateStoreRequest) ConfigureStateStoreResponse + // ReadStateBytes streams byte chunks of a given state file from a state store + ReadStateBytes(ReadStateBytesRequest) ReadStateBytesResponse + // WriteStateBytes streams byte chunks of a given state file into a state store + WriteStateBytes(WriteStateBytesRequest) WriteStateBytesResponse + // GetStates returns a list of all states (i.e. CE workspaces) managed by a given state store GetStates(GetStatesRequest) GetStatesResponse // DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace) @@ -141,6 +146,10 @@ type Interface interface { Close() error } +type StateStoreChunkSizeSetter interface { + SetStateStoreChunkSize(typeName string, size int) +} + // GetProviderSchemaResponse is the return type for GetProviderSchema, and // should only be used when handling a value for that method. The handling of // of schemas in any other context should always use ProviderSchema, so that @@ -847,11 +856,51 @@ type ConfigureStateStoreRequest struct { // Config is the configuration value to configure the store with. Config cty.Value + + Capabilities StateStoreClientCapabilities +} + +type StateStoreClientCapabilities struct { + ChunkSize int64 } type ConfigureStateStoreResponse struct { // Diagnostics contains any warnings or errors from the method call. Diagnostics tfdiags.Diagnostics + + Capabilities StateStoreServerCapabilities +} + +type StateStoreServerCapabilities struct { + ChunkSize int64 +} + +type ReadStateBytesRequest struct { + // TypeName is the name of the state store to read state from + TypeName string + // StateId is the ID of a state file to read + StateId string +} + +type ReadStateBytesResponse struct { + // Bytes represents all received bytes of the given state file + Bytes []byte + // Diagnostics contains any warnings or errors from the method call. + Diagnostics tfdiags.Diagnostics +} + +type WriteStateBytesRequest struct { + // TypeName is the name of the state store to write state to + TypeName string + // Bytes represents all bytes of the given state file to write + Bytes []byte + // StateId is the ID of a state file to write + StateId string +} + +type WriteStateBytesResponse struct { + // Diagnostics contains any warnings or errors from the method call. + Diagnostics tfdiags.Diagnostics } type GetStatesRequest struct { diff --git a/internal/providers/testing/provider_mock.go b/internal/providers/testing/provider_mock.go index 82e4dd5db08e..9b38da2ba83b 100644 --- a/internal/providers/testing/provider_mock.go +++ b/internal/providers/testing/provider_mock.go @@ -146,6 +146,16 @@ type MockProvider struct { ConfigureStateStoreRequest providers.ConfigureStateStoreRequest ConfigureStateStoreFn func(providers.ConfigureStateStoreRequest) providers.ConfigureStateStoreResponse + ReadStateBytesCalled bool + ReadStateBytesRequest providers.ReadStateBytesRequest + ReadStateBytesFn func(providers.ReadStateBytesRequest) providers.ReadStateBytesResponse + ReadStateBytesResponse providers.ReadStateBytesResponse + + WriteStateBytesCalled bool + WriteStateBytesRequest providers.WriteStateBytesRequest + WriteStateBytesFn func(providers.WriteStateBytesRequest) providers.WriteStateBytesResponse + WriteStateBytesResponse providers.WriteStateBytesResponse + GetStatesCalled bool GetStatesResponse *providers.GetStatesResponse GetStatesRequest providers.GetStatesRequest @@ -304,6 +314,32 @@ func (p *MockProvider) ValidateDataResourceConfig(r providers.ValidateDataResour return resp } +func (p *MockProvider) ReadStateBytes(r providers.ReadStateBytesRequest) (resp providers.ReadStateBytesResponse) { + p.Lock() + defer p.Unlock() + p.ReadStateBytesCalled = true + p.ReadStateBytesRequest = r + + if p.ReadStateBytesFn != nil { + return p.ReadStateBytesFn(r) + } + + return p.ReadStateBytesResponse +} + +func (p *MockProvider) WriteStateBytes(r providers.WriteStateBytesRequest) (resp providers.WriteStateBytesResponse) { + p.Lock() + defer p.Unlock() + p.WriteStateBytesCalled = true + p.WriteStateBytesRequest = r + + if p.WriteStateBytesFn != nil { + return p.WriteStateBytesFn(r) + } + + return p.WriteStateBytesResponse +} + func (p *MockProvider) ValidateEphemeralResourceConfig(r providers.ValidateEphemeralResourceConfigRequest) (resp providers.ValidateEphemeralResourceConfigResponse) { defer p.beginWrite()() diff --git a/internal/refactoring/mock_provider.go b/internal/refactoring/mock_provider.go index 15f332b0e8e3..67babcf1904f 100644 --- a/internal/refactoring/mock_provider.go +++ b/internal/refactoring/mock_provider.go @@ -134,6 +134,14 @@ func (provider *mockProvider) ConfigureStateStore(req providers.ConfigureStateSt panic("not implemented in mock") } +func (provider *mockProvider) ReadStateBytes(req providers.ReadStateBytesRequest) providers.ReadStateBytesResponse { + panic("not implemented in mock") +} + +func (provider *mockProvider) WriteStateBytes(req providers.WriteStateBytesRequest) providers.WriteStateBytesResponse { + panic("not implemented in mock") +} + func (provider *mockProvider) GetStates(req providers.GetStatesRequest) providers.GetStatesResponse { panic("not implemented in mock") } diff --git a/internal/stacks/stackruntime/internal/stackeval/stubs/errored.go b/internal/stacks/stackruntime/internal/stackeval/stubs/errored.go index e351b421cad0..0184bedcd64a 100644 --- a/internal/stacks/stackruntime/internal/stackeval/stubs/errored.go +++ b/internal/stacks/stackruntime/internal/stackeval/stubs/errored.go @@ -276,6 +276,34 @@ func (p *erroredProvider) ConfigureStateStore(providers.ConfigureStateStoreReque } } +// ReadStateBytes implements providers.Interface. +func (p *erroredProvider) ReadStateBytes(providers.ReadStateBytesRequest) providers.ReadStateBytesResponse { + var diags tfdiags.Diagnostics + diags = diags.Append(tfdiags.AttributeValue( + tfdiags.Error, + "Provider configuration is invalid", + "Cannot read state managed by this state store because its associated provider configuration is invalid.", + nil, // nil attribute path means the overall configuration block + )) + return providers.ReadStateBytesResponse{ + Diagnostics: diags, + } +} + +// WriteStateBytes implements providers.Interface. +func (p *erroredProvider) WriteStateBytes(providers.WriteStateBytesRequest) providers.WriteStateBytesResponse { + var diags tfdiags.Diagnostics + diags = diags.Append(tfdiags.AttributeValue( + tfdiags.Error, + "Provider configuration is invalid", + "Cannot write state managed by this state store because its associated provider configuration is invalid.", + nil, // nil attribute path means the overall configuration block + )) + return providers.WriteStateBytesResponse{ + Diagnostics: diags, + } +} + // GetStates implements providers.Interface. func (p *erroredProvider) GetStates(providers.GetStatesRequest) providers.GetStatesResponse { var diags tfdiags.Diagnostics diff --git a/internal/stacks/stackruntime/internal/stackeval/stubs/offline.go b/internal/stacks/stackruntime/internal/stackeval/stubs/offline.go index d4dd73c4e05e..4235f1743d71 100644 --- a/internal/stacks/stackruntime/internal/stackeval/stubs/offline.go +++ b/internal/stacks/stackruntime/internal/stackeval/stubs/offline.go @@ -293,6 +293,34 @@ func (o *offlineProvider) ConfigureStateStore(providers.ConfigureStateStoreReque } } +// ReadStateBytes implements providers.Interface. +func (o *offlineProvider) ReadStateBytes(providers.ReadStateBytesRequest) providers.ReadStateBytesResponse { + var diags tfdiags.Diagnostics + diags = diags.Append(tfdiags.AttributeValue( + tfdiags.Error, + "Called ReadStateBytes on an unconfigured provider", + "Cannot read from state store because this provider is not configured. This is a bug in Terraform - please report it.", + nil, // nil attribute path means the overall configuration block + )) + return providers.ReadStateBytesResponse{ + Diagnostics: diags, + } +} + +// WriteStateBytes implements providers.Interface. +func (o *offlineProvider) WriteStateBytes(providers.WriteStateBytesRequest) providers.WriteStateBytesResponse { + var diags tfdiags.Diagnostics + diags = diags.Append(tfdiags.AttributeValue( + tfdiags.Error, + "Called WriteStateBytes on an unconfigured provider", + "Cannot write to state store because this provider is not configured. This is a bug in Terraform - please report it.", + nil, // nil attribute path means the overall configuration block + )) + return providers.WriteStateBytesResponse{ + Diagnostics: diags, + } +} + // GetStates implements providers.Interface. func (o *offlineProvider) GetStates(providers.GetStatesRequest) providers.GetStatesResponse { var diags tfdiags.Diagnostics diff --git a/internal/stacks/stackruntime/internal/stackeval/stubs/unknown.go b/internal/stacks/stackruntime/internal/stackeval/stubs/unknown.go index 34f6c763b81e..42995611836a 100644 --- a/internal/stacks/stackruntime/internal/stackeval/stubs/unknown.go +++ b/internal/stacks/stackruntime/internal/stackeval/stubs/unknown.go @@ -341,6 +341,34 @@ func (u *unknownProvider) ConfigureStateStore(providers.ConfigureStateStoreReque } } +// ReadStateBytes implements providers.Interface. +func (u *unknownProvider) ReadStateBytes(providers.ReadStateBytesRequest) providers.ReadStateBytesResponse { + var diags tfdiags.Diagnostics + diags = diags.Append(tfdiags.AttributeValue( + tfdiags.Error, + "Provider configuration is unknown", + "Cannot read from this state store because its associated provider configuration is unknown.", + nil, // nil attribute path means the overall configuration block + )) + return providers.ReadStateBytesResponse{ + Diagnostics: diags, + } +} + +// WriteStateBytes implements providers.Interface. +func (u *unknownProvider) WriteStateBytes(providers.WriteStateBytesRequest) providers.WriteStateBytesResponse { + var diags tfdiags.Diagnostics + diags = diags.Append(tfdiags.AttributeValue( + tfdiags.Error, + "Provider configuration is unknown", + "Cannot write to this state store because its associated provider configuration is unknown.", + nil, // nil attribute path means the overall configuration block + )) + return providers.WriteStateBytesResponse{ + Diagnostics: diags, + } +} + // GetStates implements providers.Interface. func (u *unknownProvider) GetStates(providers.GetStatesRequest) providers.GetStatesResponse { var diags tfdiags.Diagnostics diff --git a/internal/tfplugin6/tfplugin6.pb.go b/internal/tfplugin6/tfplugin6.pb.go index c40bb14b33be..7351d20d959e 100644 --- a/internal/tfplugin6/tfplugin6.pb.go +++ b/internal/tfplugin6/tfplugin6.pb.go @@ -2074,6 +2074,270 @@ func (*ConfigureStateStore) Descriptor() ([]byte, []int) { return file_tfplugin6_proto_rawDescGZIP(), []int{39} } +type StateStoreClientCapabilities struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChunkSize int64 `protobuf:"varint,1,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` // suggested chunk size by Core + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StateStoreClientCapabilities) Reset() { + *x = StateStoreClientCapabilities{} + mi := &file_tfplugin6_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StateStoreClientCapabilities) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateStoreClientCapabilities) ProtoMessage() {} + +func (x *StateStoreClientCapabilities) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StateStoreClientCapabilities.ProtoReflect.Descriptor instead. +func (*StateStoreClientCapabilities) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{40} +} + +func (x *StateStoreClientCapabilities) GetChunkSize() int64 { + if x != nil { + return x.ChunkSize + } + return 0 +} + +type StateStoreServerCapabilities struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChunkSize int64 `protobuf:"varint,1,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size,omitempty"` // chosen chunk size by plugin + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StateStoreServerCapabilities) Reset() { + *x = StateStoreServerCapabilities{} + mi := &file_tfplugin6_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StateStoreServerCapabilities) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateStoreServerCapabilities) ProtoMessage() {} + +func (x *StateStoreServerCapabilities) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StateStoreServerCapabilities.ProtoReflect.Descriptor instead. +func (*StateStoreServerCapabilities) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{41} +} + +func (x *StateStoreServerCapabilities) GetChunkSize() int64 { + if x != nil { + return x.ChunkSize + } + return 0 +} + +type ReadStateBytes struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ReadStateBytes) Reset() { + *x = ReadStateBytes{} + mi := &file_tfplugin6_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ReadStateBytes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ReadStateBytes) ProtoMessage() {} + +func (x *ReadStateBytes) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ReadStateBytes.ProtoReflect.Descriptor instead. +func (*ReadStateBytes) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{42} +} + +type WriteStateBytes struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WriteStateBytes) Reset() { + *x = WriteStateBytes{} + mi := &file_tfplugin6_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WriteStateBytes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteStateBytes) ProtoMessage() {} + +func (x *WriteStateBytes) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteStateBytes.ProtoReflect.Descriptor instead. +func (*WriteStateBytes) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{43} +} + +type RequestChunkMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` + StateId string `protobuf:"bytes,2,opt,name=state_id,json=stateId,proto3" json:"state_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestChunkMeta) Reset() { + *x = RequestChunkMeta{} + mi := &file_tfplugin6_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestChunkMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestChunkMeta) ProtoMessage() {} + +func (x *RequestChunkMeta) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestChunkMeta.ProtoReflect.Descriptor instead. +func (*RequestChunkMeta) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{44} +} + +func (x *RequestChunkMeta) GetTypeName() string { + if x != nil { + return x.TypeName + } + return "" +} + +func (x *RequestChunkMeta) GetStateId() string { + if x != nil { + return x.StateId + } + return "" +} + +type StateRange struct { + state protoimpl.MessageState `protogen:"open.v1"` + Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` + End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StateRange) Reset() { + *x = StateRange{} + mi := &file_tfplugin6_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StateRange) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StateRange) ProtoMessage() {} + +func (x *StateRange) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StateRange.ProtoReflect.Descriptor instead. +func (*StateRange) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{45} +} + +func (x *StateRange) GetStart() int64 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *StateRange) GetEnd() int64 { + if x != nil { + return x.End + } + return 0 +} + type GetStates struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -2082,7 +2346,7 @@ type GetStates struct { func (x *GetStates) Reset() { *x = GetStates{} - mi := &file_tfplugin6_proto_msgTypes[40] + mi := &file_tfplugin6_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2094,7 +2358,7 @@ func (x *GetStates) String() string { func (*GetStates) ProtoMessage() {} func (x *GetStates) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[40] + mi := &file_tfplugin6_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2107,7 +2371,7 @@ func (x *GetStates) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStates.ProtoReflect.Descriptor instead. func (*GetStates) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{40} + return file_tfplugin6_proto_rawDescGZIP(), []int{46} } type DeleteState struct { @@ -2118,7 +2382,7 @@ type DeleteState struct { func (x *DeleteState) Reset() { *x = DeleteState{} - mi := &file_tfplugin6_proto_msgTypes[41] + mi := &file_tfplugin6_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2130,7 +2394,7 @@ func (x *DeleteState) String() string { func (*DeleteState) ProtoMessage() {} func (x *DeleteState) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[41] + mi := &file_tfplugin6_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2143,7 +2407,7 @@ func (x *DeleteState) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteState.ProtoReflect.Descriptor instead. func (*DeleteState) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{41} + return file_tfplugin6_proto_rawDescGZIP(), []int{47} } type PlanAction struct { @@ -2154,7 +2418,7 @@ type PlanAction struct { func (x *PlanAction) Reset() { *x = PlanAction{} - mi := &file_tfplugin6_proto_msgTypes[42] + mi := &file_tfplugin6_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2166,7 +2430,7 @@ func (x *PlanAction) String() string { func (*PlanAction) ProtoMessage() {} func (x *PlanAction) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[42] + mi := &file_tfplugin6_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2179,7 +2443,7 @@ func (x *PlanAction) ProtoReflect() protoreflect.Message { // Deprecated: Use PlanAction.ProtoReflect.Descriptor instead. func (*PlanAction) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{42} + return file_tfplugin6_proto_rawDescGZIP(), []int{48} } type InvokeAction struct { @@ -2190,7 +2454,7 @@ type InvokeAction struct { func (x *InvokeAction) Reset() { *x = InvokeAction{} - mi := &file_tfplugin6_proto_msgTypes[43] + mi := &file_tfplugin6_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2202,7 +2466,7 @@ func (x *InvokeAction) String() string { func (*InvokeAction) ProtoMessage() {} func (x *InvokeAction) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[43] + mi := &file_tfplugin6_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2215,7 +2479,7 @@ func (x *InvokeAction) ProtoReflect() protoreflect.Message { // Deprecated: Use InvokeAction.ProtoReflect.Descriptor instead. func (*InvokeAction) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{43} + return file_tfplugin6_proto_rawDescGZIP(), []int{49} } type ValidateActionConfig struct { @@ -2226,7 +2490,7 @@ type ValidateActionConfig struct { func (x *ValidateActionConfig) Reset() { *x = ValidateActionConfig{} - mi := &file_tfplugin6_proto_msgTypes[44] + mi := &file_tfplugin6_proto_msgTypes[50] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2238,7 +2502,7 @@ func (x *ValidateActionConfig) String() string { func (*ValidateActionConfig) ProtoMessage() {} func (x *ValidateActionConfig) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[44] + mi := &file_tfplugin6_proto_msgTypes[50] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2251,7 +2515,7 @@ func (x *ValidateActionConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateActionConfig.ProtoReflect.Descriptor instead. func (*ValidateActionConfig) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{44} + return file_tfplugin6_proto_rawDescGZIP(), []int{50} } type AttributePath_Step struct { @@ -2268,7 +2532,7 @@ type AttributePath_Step struct { func (x *AttributePath_Step) Reset() { *x = AttributePath_Step{} - mi := &file_tfplugin6_proto_msgTypes[45] + mi := &file_tfplugin6_proto_msgTypes[51] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2280,7 +2544,7 @@ func (x *AttributePath_Step) String() string { func (*AttributePath_Step) ProtoMessage() {} func (x *AttributePath_Step) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[45] + mi := &file_tfplugin6_proto_msgTypes[51] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2364,7 +2628,7 @@ type StopProvider_Request struct { func (x *StopProvider_Request) Reset() { *x = StopProvider_Request{} - mi := &file_tfplugin6_proto_msgTypes[46] + mi := &file_tfplugin6_proto_msgTypes[52] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2376,7 +2640,7 @@ func (x *StopProvider_Request) String() string { func (*StopProvider_Request) ProtoMessage() {} func (x *StopProvider_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[46] + mi := &file_tfplugin6_proto_msgTypes[52] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2401,7 +2665,7 @@ type StopProvider_Response struct { func (x *StopProvider_Response) Reset() { *x = StopProvider_Response{} - mi := &file_tfplugin6_proto_msgTypes[47] + mi := &file_tfplugin6_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2413,7 +2677,7 @@ func (x *StopProvider_Response) String() string { func (*StopProvider_Response) ProtoMessage() {} func (x *StopProvider_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[47] + mi := &file_tfplugin6_proto_msgTypes[53] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2459,7 +2723,7 @@ type ResourceIdentitySchema_IdentityAttribute struct { func (x *ResourceIdentitySchema_IdentityAttribute) Reset() { *x = ResourceIdentitySchema_IdentityAttribute{} - mi := &file_tfplugin6_proto_msgTypes[49] + mi := &file_tfplugin6_proto_msgTypes[55] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2471,7 +2735,7 @@ func (x *ResourceIdentitySchema_IdentityAttribute) String() string { func (*ResourceIdentitySchema_IdentityAttribute) ProtoMessage() {} func (x *ResourceIdentitySchema_IdentityAttribute) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[49] + mi := &file_tfplugin6_proto_msgTypes[55] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2536,7 +2800,7 @@ type Schema_Block struct { func (x *Schema_Block) Reset() { *x = Schema_Block{} - mi := &file_tfplugin6_proto_msgTypes[50] + mi := &file_tfplugin6_proto_msgTypes[56] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2548,7 +2812,7 @@ func (x *Schema_Block) String() string { func (*Schema_Block) ProtoMessage() {} func (x *Schema_Block) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[50] + mi := &file_tfplugin6_proto_msgTypes[56] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2625,7 +2889,7 @@ type Schema_Attribute struct { func (x *Schema_Attribute) Reset() { *x = Schema_Attribute{} - mi := &file_tfplugin6_proto_msgTypes[51] + mi := &file_tfplugin6_proto_msgTypes[57] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2637,7 +2901,7 @@ func (x *Schema_Attribute) String() string { func (*Schema_Attribute) ProtoMessage() {} func (x *Schema_Attribute) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[51] + mi := &file_tfplugin6_proto_msgTypes[57] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2743,7 +3007,7 @@ type Schema_NestedBlock struct { func (x *Schema_NestedBlock) Reset() { *x = Schema_NestedBlock{} - mi := &file_tfplugin6_proto_msgTypes[52] + mi := &file_tfplugin6_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2755,7 +3019,7 @@ func (x *Schema_NestedBlock) String() string { func (*Schema_NestedBlock) ProtoMessage() {} func (x *Schema_NestedBlock) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[52] + mi := &file_tfplugin6_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2823,7 +3087,7 @@ type Schema_Object struct { func (x *Schema_Object) Reset() { *x = Schema_Object{} - mi := &file_tfplugin6_proto_msgTypes[53] + mi := &file_tfplugin6_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2835,7 +3099,7 @@ func (x *Schema_Object) String() string { func (*Schema_Object) ProtoMessage() {} func (x *Schema_Object) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[53] + mi := &file_tfplugin6_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2906,7 +3170,7 @@ type Function_Parameter struct { func (x *Function_Parameter) Reset() { *x = Function_Parameter{} - mi := &file_tfplugin6_proto_msgTypes[54] + mi := &file_tfplugin6_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2918,7 +3182,7 @@ func (x *Function_Parameter) String() string { func (*Function_Parameter) ProtoMessage() {} func (x *Function_Parameter) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[54] + mi := &file_tfplugin6_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2986,7 +3250,7 @@ type Function_Return struct { func (x *Function_Return) Reset() { *x = Function_Return{} - mi := &file_tfplugin6_proto_msgTypes[55] + mi := &file_tfplugin6_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2998,7 +3262,7 @@ func (x *Function_Return) String() string { func (*Function_Return) ProtoMessage() {} func (x *Function_Return) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[55] + mi := &file_tfplugin6_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3029,7 +3293,7 @@ type GetMetadata_Request struct { func (x *GetMetadata_Request) Reset() { *x = GetMetadata_Request{} - mi := &file_tfplugin6_proto_msgTypes[56] + mi := &file_tfplugin6_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3041,7 +3305,7 @@ func (x *GetMetadata_Request) String() string { func (*GetMetadata_Request) ProtoMessage() {} func (x *GetMetadata_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[56] + mi := &file_tfplugin6_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3075,7 +3339,7 @@ type GetMetadata_Response struct { func (x *GetMetadata_Response) Reset() { *x = GetMetadata_Response{} - mi := &file_tfplugin6_proto_msgTypes[57] + mi := &file_tfplugin6_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3087,7 +3351,7 @@ func (x *GetMetadata_Response) String() string { func (*GetMetadata_Response) ProtoMessage() {} func (x *GetMetadata_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[57] + mi := &file_tfplugin6_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3175,7 +3439,7 @@ type GetMetadata_EphemeralMetadata struct { func (x *GetMetadata_EphemeralMetadata) Reset() { *x = GetMetadata_EphemeralMetadata{} - mi := &file_tfplugin6_proto_msgTypes[58] + mi := &file_tfplugin6_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3187,7 +3451,7 @@ func (x *GetMetadata_EphemeralMetadata) String() string { func (*GetMetadata_EphemeralMetadata) ProtoMessage() {} func (x *GetMetadata_EphemeralMetadata) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[58] + mi := &file_tfplugin6_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3220,7 +3484,7 @@ type GetMetadata_FunctionMetadata struct { func (x *GetMetadata_FunctionMetadata) Reset() { *x = GetMetadata_FunctionMetadata{} - mi := &file_tfplugin6_proto_msgTypes[59] + mi := &file_tfplugin6_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3232,7 +3496,7 @@ func (x *GetMetadata_FunctionMetadata) String() string { func (*GetMetadata_FunctionMetadata) ProtoMessage() {} func (x *GetMetadata_FunctionMetadata) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[59] + mi := &file_tfplugin6_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3264,7 +3528,7 @@ type GetMetadata_DataSourceMetadata struct { func (x *GetMetadata_DataSourceMetadata) Reset() { *x = GetMetadata_DataSourceMetadata{} - mi := &file_tfplugin6_proto_msgTypes[60] + mi := &file_tfplugin6_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3276,7 +3540,7 @@ func (x *GetMetadata_DataSourceMetadata) String() string { func (*GetMetadata_DataSourceMetadata) ProtoMessage() {} func (x *GetMetadata_DataSourceMetadata) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[60] + mi := &file_tfplugin6_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3308,7 +3572,7 @@ type GetMetadata_ResourceMetadata struct { func (x *GetMetadata_ResourceMetadata) Reset() { *x = GetMetadata_ResourceMetadata{} - mi := &file_tfplugin6_proto_msgTypes[61] + mi := &file_tfplugin6_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3320,7 +3584,7 @@ func (x *GetMetadata_ResourceMetadata) String() string { func (*GetMetadata_ResourceMetadata) ProtoMessage() {} func (x *GetMetadata_ResourceMetadata) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[61] + mi := &file_tfplugin6_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3352,7 +3616,7 @@ type GetMetadata_ListResourceMetadata struct { func (x *GetMetadata_ListResourceMetadata) Reset() { *x = GetMetadata_ListResourceMetadata{} - mi := &file_tfplugin6_proto_msgTypes[62] + mi := &file_tfplugin6_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3364,7 +3628,7 @@ func (x *GetMetadata_ListResourceMetadata) String() string { func (*GetMetadata_ListResourceMetadata) ProtoMessage() {} func (x *GetMetadata_ListResourceMetadata) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[62] + mi := &file_tfplugin6_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3396,7 +3660,7 @@ type GetMetadata_StateStoreMetadata struct { func (x *GetMetadata_StateStoreMetadata) Reset() { *x = GetMetadata_StateStoreMetadata{} - mi := &file_tfplugin6_proto_msgTypes[63] + mi := &file_tfplugin6_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3408,7 +3672,7 @@ func (x *GetMetadata_StateStoreMetadata) String() string { func (*GetMetadata_StateStoreMetadata) ProtoMessage() {} func (x *GetMetadata_StateStoreMetadata) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[63] + mi := &file_tfplugin6_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3440,7 +3704,7 @@ type GetMetadata_ActionMetadata struct { func (x *GetMetadata_ActionMetadata) Reset() { *x = GetMetadata_ActionMetadata{} - mi := &file_tfplugin6_proto_msgTypes[64] + mi := &file_tfplugin6_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3452,7 +3716,7 @@ func (x *GetMetadata_ActionMetadata) String() string { func (*GetMetadata_ActionMetadata) ProtoMessage() {} func (x *GetMetadata_ActionMetadata) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[64] + mi := &file_tfplugin6_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3483,7 +3747,7 @@ type GetProviderSchema_Request struct { func (x *GetProviderSchema_Request) Reset() { *x = GetProviderSchema_Request{} - mi := &file_tfplugin6_proto_msgTypes[65] + mi := &file_tfplugin6_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3495,7 +3759,7 @@ func (x *GetProviderSchema_Request) String() string { func (*GetProviderSchema_Request) ProtoMessage() {} func (x *GetProviderSchema_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[65] + mi := &file_tfplugin6_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3530,7 +3794,7 @@ type GetProviderSchema_Response struct { func (x *GetProviderSchema_Response) Reset() { *x = GetProviderSchema_Response{} - mi := &file_tfplugin6_proto_msgTypes[66] + mi := &file_tfplugin6_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3542,7 +3806,7 @@ func (x *GetProviderSchema_Response) String() string { func (*GetProviderSchema_Response) ProtoMessage() {} func (x *GetProviderSchema_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[66] + mi := &file_tfplugin6_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3644,7 +3908,7 @@ type ValidateProviderConfig_Request struct { func (x *ValidateProviderConfig_Request) Reset() { *x = ValidateProviderConfig_Request{} - mi := &file_tfplugin6_proto_msgTypes[74] + mi := &file_tfplugin6_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3656,7 +3920,7 @@ func (x *ValidateProviderConfig_Request) String() string { func (*ValidateProviderConfig_Request) ProtoMessage() {} func (x *ValidateProviderConfig_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[74] + mi := &file_tfplugin6_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3688,7 +3952,7 @@ type ValidateProviderConfig_Response struct { func (x *ValidateProviderConfig_Response) Reset() { *x = ValidateProviderConfig_Response{} - mi := &file_tfplugin6_proto_msgTypes[75] + mi := &file_tfplugin6_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3700,7 +3964,7 @@ func (x *ValidateProviderConfig_Response) String() string { func (*ValidateProviderConfig_Response) ProtoMessage() {} func (x *ValidateProviderConfig_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[75] + mi := &file_tfplugin6_proto_msgTypes[81] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3749,7 +4013,7 @@ type UpgradeResourceState_Request struct { func (x *UpgradeResourceState_Request) Reset() { *x = UpgradeResourceState_Request{} - mi := &file_tfplugin6_proto_msgTypes[76] + mi := &file_tfplugin6_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3761,7 +4025,7 @@ func (x *UpgradeResourceState_Request) String() string { func (*UpgradeResourceState_Request) ProtoMessage() {} func (x *UpgradeResourceState_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[76] + mi := &file_tfplugin6_proto_msgTypes[82] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3814,7 +4078,7 @@ type UpgradeResourceState_Response struct { func (x *UpgradeResourceState_Response) Reset() { *x = UpgradeResourceState_Response{} - mi := &file_tfplugin6_proto_msgTypes[77] + mi := &file_tfplugin6_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3826,7 +4090,7 @@ func (x *UpgradeResourceState_Response) String() string { func (*UpgradeResourceState_Response) ProtoMessage() {} func (x *UpgradeResourceState_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[77] + mi := &file_tfplugin6_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3864,7 +4128,7 @@ type GetResourceIdentitySchemas_Request struct { func (x *GetResourceIdentitySchemas_Request) Reset() { *x = GetResourceIdentitySchemas_Request{} - mi := &file_tfplugin6_proto_msgTypes[78] + mi := &file_tfplugin6_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3876,7 +4140,7 @@ func (x *GetResourceIdentitySchemas_Request) String() string { func (*GetResourceIdentitySchemas_Request) ProtoMessage() {} func (x *GetResourceIdentitySchemas_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[78] + mi := &file_tfplugin6_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3904,7 +4168,7 @@ type GetResourceIdentitySchemas_Response struct { func (x *GetResourceIdentitySchemas_Response) Reset() { *x = GetResourceIdentitySchemas_Response{} - mi := &file_tfplugin6_proto_msgTypes[79] + mi := &file_tfplugin6_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3916,7 +4180,7 @@ func (x *GetResourceIdentitySchemas_Response) String() string { func (*GetResourceIdentitySchemas_Response) ProtoMessage() {} func (x *GetResourceIdentitySchemas_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[79] + mi := &file_tfplugin6_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3963,7 +4227,7 @@ type UpgradeResourceIdentity_Request struct { func (x *UpgradeResourceIdentity_Request) Reset() { *x = UpgradeResourceIdentity_Request{} - mi := &file_tfplugin6_proto_msgTypes[81] + mi := &file_tfplugin6_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3975,7 +4239,7 @@ func (x *UpgradeResourceIdentity_Request) String() string { func (*UpgradeResourceIdentity_Request) ProtoMessage() {} func (x *UpgradeResourceIdentity_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[81] + mi := &file_tfplugin6_proto_msgTypes[87] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4024,7 +4288,7 @@ type UpgradeResourceIdentity_Response struct { func (x *UpgradeResourceIdentity_Response) Reset() { *x = UpgradeResourceIdentity_Response{} - mi := &file_tfplugin6_proto_msgTypes[82] + mi := &file_tfplugin6_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4036,7 +4300,7 @@ func (x *UpgradeResourceIdentity_Response) String() string { func (*UpgradeResourceIdentity_Response) ProtoMessage() {} func (x *UpgradeResourceIdentity_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[82] + mi := &file_tfplugin6_proto_msgTypes[88] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4077,7 +4341,7 @@ type ValidateResourceConfig_Request struct { func (x *ValidateResourceConfig_Request) Reset() { *x = ValidateResourceConfig_Request{} - mi := &file_tfplugin6_proto_msgTypes[83] + mi := &file_tfplugin6_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4089,7 +4353,7 @@ func (x *ValidateResourceConfig_Request) String() string { func (*ValidateResourceConfig_Request) ProtoMessage() {} func (x *ValidateResourceConfig_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[83] + mi := &file_tfplugin6_proto_msgTypes[89] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4135,7 +4399,7 @@ type ValidateResourceConfig_Response struct { func (x *ValidateResourceConfig_Response) Reset() { *x = ValidateResourceConfig_Response{} - mi := &file_tfplugin6_proto_msgTypes[84] + mi := &file_tfplugin6_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4147,7 +4411,7 @@ func (x *ValidateResourceConfig_Response) String() string { func (*ValidateResourceConfig_Response) ProtoMessage() {} func (x *ValidateResourceConfig_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[84] + mi := &file_tfplugin6_proto_msgTypes[90] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4180,7 +4444,7 @@ type ValidateDataResourceConfig_Request struct { func (x *ValidateDataResourceConfig_Request) Reset() { *x = ValidateDataResourceConfig_Request{} - mi := &file_tfplugin6_proto_msgTypes[85] + mi := &file_tfplugin6_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4192,7 +4456,7 @@ func (x *ValidateDataResourceConfig_Request) String() string { func (*ValidateDataResourceConfig_Request) ProtoMessage() {} func (x *ValidateDataResourceConfig_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[85] + mi := &file_tfplugin6_proto_msgTypes[91] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4231,7 +4495,7 @@ type ValidateDataResourceConfig_Response struct { func (x *ValidateDataResourceConfig_Response) Reset() { *x = ValidateDataResourceConfig_Response{} - mi := &file_tfplugin6_proto_msgTypes[86] + mi := &file_tfplugin6_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4243,7 +4507,7 @@ func (x *ValidateDataResourceConfig_Response) String() string { func (*ValidateDataResourceConfig_Response) ProtoMessage() {} func (x *ValidateDataResourceConfig_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[86] + mi := &file_tfplugin6_proto_msgTypes[92] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4276,7 +4540,7 @@ type ValidateEphemeralResourceConfig_Request struct { func (x *ValidateEphemeralResourceConfig_Request) Reset() { *x = ValidateEphemeralResourceConfig_Request{} - mi := &file_tfplugin6_proto_msgTypes[87] + mi := &file_tfplugin6_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4288,7 +4552,7 @@ func (x *ValidateEphemeralResourceConfig_Request) String() string { func (*ValidateEphemeralResourceConfig_Request) ProtoMessage() {} func (x *ValidateEphemeralResourceConfig_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[87] + mi := &file_tfplugin6_proto_msgTypes[93] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4327,7 +4591,7 @@ type ValidateEphemeralResourceConfig_Response struct { func (x *ValidateEphemeralResourceConfig_Response) Reset() { *x = ValidateEphemeralResourceConfig_Response{} - mi := &file_tfplugin6_proto_msgTypes[88] + mi := &file_tfplugin6_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4339,7 +4603,7 @@ func (x *ValidateEphemeralResourceConfig_Response) String() string { func (*ValidateEphemeralResourceConfig_Response) ProtoMessage() {} func (x *ValidateEphemeralResourceConfig_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[88] + mi := &file_tfplugin6_proto_msgTypes[94] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4373,7 +4637,7 @@ type ConfigureProvider_Request struct { func (x *ConfigureProvider_Request) Reset() { *x = ConfigureProvider_Request{} - mi := &file_tfplugin6_proto_msgTypes[89] + mi := &file_tfplugin6_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4385,7 +4649,7 @@ func (x *ConfigureProvider_Request) String() string { func (*ConfigureProvider_Request) ProtoMessage() {} func (x *ConfigureProvider_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[89] + mi := &file_tfplugin6_proto_msgTypes[95] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4431,7 +4695,7 @@ type ConfigureProvider_Response struct { func (x *ConfigureProvider_Response) Reset() { *x = ConfigureProvider_Response{} - mi := &file_tfplugin6_proto_msgTypes[90] + mi := &file_tfplugin6_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4443,7 +4707,7 @@ func (x *ConfigureProvider_Response) String() string { func (*ConfigureProvider_Response) ProtoMessage() {} func (x *ConfigureProvider_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[90] + mi := &file_tfplugin6_proto_msgTypes[96] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4488,7 +4752,7 @@ type ReadResource_Request struct { func (x *ReadResource_Request) Reset() { *x = ReadResource_Request{} - mi := &file_tfplugin6_proto_msgTypes[91] + mi := &file_tfplugin6_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4500,7 +4764,7 @@ func (x *ReadResource_Request) String() string { func (*ReadResource_Request) ProtoMessage() {} func (x *ReadResource_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[91] + mi := &file_tfplugin6_proto_msgTypes[97] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4573,7 +4837,7 @@ type ReadResource_Response struct { func (x *ReadResource_Response) Reset() { *x = ReadResource_Response{} - mi := &file_tfplugin6_proto_msgTypes[92] + mi := &file_tfplugin6_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4585,7 +4849,7 @@ func (x *ReadResource_Response) String() string { func (*ReadResource_Response) ProtoMessage() {} func (x *ReadResource_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[92] + mi := &file_tfplugin6_proto_msgTypes[98] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4652,7 +4916,7 @@ type PlanResourceChange_Request struct { func (x *PlanResourceChange_Request) Reset() { *x = PlanResourceChange_Request{} - mi := &file_tfplugin6_proto_msgTypes[93] + mi := &file_tfplugin6_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4664,7 +4928,7 @@ func (x *PlanResourceChange_Request) String() string { func (*PlanResourceChange_Request) ProtoMessage() {} func (x *PlanResourceChange_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[93] + mi := &file_tfplugin6_proto_msgTypes[99] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4764,7 +5028,7 @@ type PlanResourceChange_Response struct { func (x *PlanResourceChange_Response) Reset() { *x = PlanResourceChange_Response{} - mi := &file_tfplugin6_proto_msgTypes[94] + mi := &file_tfplugin6_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4776,7 +5040,7 @@ func (x *PlanResourceChange_Response) String() string { func (*PlanResourceChange_Response) ProtoMessage() {} func (x *PlanResourceChange_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[94] + mi := &file_tfplugin6_proto_msgTypes[100] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4856,7 +5120,7 @@ type ApplyResourceChange_Request struct { func (x *ApplyResourceChange_Request) Reset() { *x = ApplyResourceChange_Request{} - mi := &file_tfplugin6_proto_msgTypes[95] + mi := &file_tfplugin6_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4868,7 +5132,7 @@ func (x *ApplyResourceChange_Request) String() string { func (*ApplyResourceChange_Request) ProtoMessage() {} func (x *ApplyResourceChange_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[95] + mi := &file_tfplugin6_proto_msgTypes[101] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4957,7 +5221,7 @@ type ApplyResourceChange_Response struct { func (x *ApplyResourceChange_Response) Reset() { *x = ApplyResourceChange_Response{} - mi := &file_tfplugin6_proto_msgTypes[96] + mi := &file_tfplugin6_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4969,7 +5233,7 @@ func (x *ApplyResourceChange_Response) String() string { func (*ApplyResourceChange_Response) ProtoMessage() {} func (x *ApplyResourceChange_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[96] + mi := &file_tfplugin6_proto_msgTypes[102] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5032,7 +5296,7 @@ type ImportResourceState_Request struct { func (x *ImportResourceState_Request) Reset() { *x = ImportResourceState_Request{} - mi := &file_tfplugin6_proto_msgTypes[97] + mi := &file_tfplugin6_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5044,7 +5308,7 @@ func (x *ImportResourceState_Request) String() string { func (*ImportResourceState_Request) ProtoMessage() {} func (x *ImportResourceState_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[97] + mi := &file_tfplugin6_proto_msgTypes[103] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5100,7 +5364,7 @@ type ImportResourceState_ImportedResource struct { func (x *ImportResourceState_ImportedResource) Reset() { *x = ImportResourceState_ImportedResource{} - mi := &file_tfplugin6_proto_msgTypes[98] + mi := &file_tfplugin6_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5112,7 +5376,7 @@ func (x *ImportResourceState_ImportedResource) String() string { func (*ImportResourceState_ImportedResource) ProtoMessage() {} func (x *ImportResourceState_ImportedResource) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[98] + mi := &file_tfplugin6_proto_msgTypes[104] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5169,7 +5433,7 @@ type ImportResourceState_Response struct { func (x *ImportResourceState_Response) Reset() { *x = ImportResourceState_Response{} - mi := &file_tfplugin6_proto_msgTypes[99] + mi := &file_tfplugin6_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5181,7 +5445,7 @@ func (x *ImportResourceState_Response) String() string { func (*ImportResourceState_Response) ProtoMessage() {} func (x *ImportResourceState_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[99] + mi := &file_tfplugin6_proto_msgTypes[105] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5228,7 +5492,7 @@ type GenerateResourceConfig_Request struct { func (x *GenerateResourceConfig_Request) Reset() { *x = GenerateResourceConfig_Request{} - mi := &file_tfplugin6_proto_msgTypes[100] + mi := &file_tfplugin6_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5240,7 +5504,7 @@ func (x *GenerateResourceConfig_Request) String() string { func (*GenerateResourceConfig_Request) ProtoMessage() {} func (x *GenerateResourceConfig_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[100] + mi := &file_tfplugin6_proto_msgTypes[106] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5281,7 +5545,7 @@ type GenerateResourceConfig_Response struct { func (x *GenerateResourceConfig_Response) Reset() { *x = GenerateResourceConfig_Response{} - mi := &file_tfplugin6_proto_msgTypes[101] + mi := &file_tfplugin6_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5293,7 +5557,7 @@ func (x *GenerateResourceConfig_Response) String() string { func (*GenerateResourceConfig_Response) ProtoMessage() {} func (x *GenerateResourceConfig_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[101] + mi := &file_tfplugin6_proto_msgTypes[107] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5353,7 +5617,7 @@ type MoveResourceState_Request struct { func (x *MoveResourceState_Request) Reset() { *x = MoveResourceState_Request{} - mi := &file_tfplugin6_proto_msgTypes[102] + mi := &file_tfplugin6_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5365,7 +5629,7 @@ func (x *MoveResourceState_Request) String() string { func (*MoveResourceState_Request) ProtoMessage() {} func (x *MoveResourceState_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[102] + mi := &file_tfplugin6_proto_msgTypes[108] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5452,7 +5716,7 @@ type MoveResourceState_Response struct { func (x *MoveResourceState_Response) Reset() { *x = MoveResourceState_Response{} - mi := &file_tfplugin6_proto_msgTypes[103] + mi := &file_tfplugin6_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5464,7 +5728,7 @@ func (x *MoveResourceState_Response) String() string { func (*MoveResourceState_Response) ProtoMessage() {} func (x *MoveResourceState_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[103] + mi := &file_tfplugin6_proto_msgTypes[109] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5520,7 +5784,7 @@ type ReadDataSource_Request struct { func (x *ReadDataSource_Request) Reset() { *x = ReadDataSource_Request{} - mi := &file_tfplugin6_proto_msgTypes[104] + mi := &file_tfplugin6_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5532,7 +5796,7 @@ func (x *ReadDataSource_Request) String() string { func (*ReadDataSource_Request) ProtoMessage() {} func (x *ReadDataSource_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[104] + mi := &file_tfplugin6_proto_msgTypes[110] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5589,7 +5853,7 @@ type ReadDataSource_Response struct { func (x *ReadDataSource_Response) Reset() { *x = ReadDataSource_Response{} - mi := &file_tfplugin6_proto_msgTypes[105] + mi := &file_tfplugin6_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5601,7 +5865,7 @@ func (x *ReadDataSource_Response) String() string { func (*ReadDataSource_Response) ProtoMessage() {} func (x *ReadDataSource_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[105] + mi := &file_tfplugin6_proto_msgTypes[111] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5649,7 +5913,7 @@ type OpenEphemeralResource_Request struct { func (x *OpenEphemeralResource_Request) Reset() { *x = OpenEphemeralResource_Request{} - mi := &file_tfplugin6_proto_msgTypes[106] + mi := &file_tfplugin6_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5661,7 +5925,7 @@ func (x *OpenEphemeralResource_Request) String() string { func (*OpenEphemeralResource_Request) ProtoMessage() {} func (x *OpenEphemeralResource_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[106] + mi := &file_tfplugin6_proto_msgTypes[112] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5711,7 +5975,7 @@ type OpenEphemeralResource_Response struct { func (x *OpenEphemeralResource_Response) Reset() { *x = OpenEphemeralResource_Response{} - mi := &file_tfplugin6_proto_msgTypes[107] + mi := &file_tfplugin6_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5723,7 +5987,7 @@ func (x *OpenEphemeralResource_Response) String() string { func (*OpenEphemeralResource_Response) ProtoMessage() {} func (x *OpenEphemeralResource_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[107] + mi := &file_tfplugin6_proto_msgTypes[113] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5784,7 +6048,7 @@ type RenewEphemeralResource_Request struct { func (x *RenewEphemeralResource_Request) Reset() { *x = RenewEphemeralResource_Request{} - mi := &file_tfplugin6_proto_msgTypes[108] + mi := &file_tfplugin6_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5796,7 +6060,7 @@ func (x *RenewEphemeralResource_Request) String() string { func (*RenewEphemeralResource_Request) ProtoMessage() {} func (x *RenewEphemeralResource_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[108] + mi := &file_tfplugin6_proto_msgTypes[114] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5837,7 +6101,7 @@ type RenewEphemeralResource_Response struct { func (x *RenewEphemeralResource_Response) Reset() { *x = RenewEphemeralResource_Response{} - mi := &file_tfplugin6_proto_msgTypes[109] + mi := &file_tfplugin6_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5849,7 +6113,7 @@ func (x *RenewEphemeralResource_Response) String() string { func (*RenewEphemeralResource_Response) ProtoMessage() {} func (x *RenewEphemeralResource_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[109] + mi := &file_tfplugin6_proto_msgTypes[115] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5896,7 +6160,7 @@ type CloseEphemeralResource_Request struct { func (x *CloseEphemeralResource_Request) Reset() { *x = CloseEphemeralResource_Request{} - mi := &file_tfplugin6_proto_msgTypes[110] + mi := &file_tfplugin6_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5908,7 +6172,7 @@ func (x *CloseEphemeralResource_Request) String() string { func (*CloseEphemeralResource_Request) ProtoMessage() {} func (x *CloseEphemeralResource_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[110] + mi := &file_tfplugin6_proto_msgTypes[116] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5947,7 +6211,7 @@ type CloseEphemeralResource_Response struct { func (x *CloseEphemeralResource_Response) Reset() { *x = CloseEphemeralResource_Response{} - mi := &file_tfplugin6_proto_msgTypes[111] + mi := &file_tfplugin6_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5959,7 +6223,7 @@ func (x *CloseEphemeralResource_Response) String() string { func (*CloseEphemeralResource_Response) ProtoMessage() {} func (x *CloseEphemeralResource_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[111] + mi := &file_tfplugin6_proto_msgTypes[117] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5990,7 +6254,7 @@ type GetFunctions_Request struct { func (x *GetFunctions_Request) Reset() { *x = GetFunctions_Request{} - mi := &file_tfplugin6_proto_msgTypes[112] + mi := &file_tfplugin6_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6002,7 +6266,7 @@ func (x *GetFunctions_Request) String() string { func (*GetFunctions_Request) ProtoMessage() {} func (x *GetFunctions_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[112] + mi := &file_tfplugin6_proto_msgTypes[118] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6030,7 +6294,7 @@ type GetFunctions_Response struct { func (x *GetFunctions_Response) Reset() { *x = GetFunctions_Response{} - mi := &file_tfplugin6_proto_msgTypes[113] + mi := &file_tfplugin6_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6042,7 +6306,7 @@ func (x *GetFunctions_Response) String() string { func (*GetFunctions_Response) ProtoMessage() {} func (x *GetFunctions_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[113] + mi := &file_tfplugin6_proto_msgTypes[119] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6082,7 +6346,7 @@ type CallFunction_Request struct { func (x *CallFunction_Request) Reset() { *x = CallFunction_Request{} - mi := &file_tfplugin6_proto_msgTypes[115] + mi := &file_tfplugin6_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6094,7 +6358,7 @@ func (x *CallFunction_Request) String() string { func (*CallFunction_Request) ProtoMessage() {} func (x *CallFunction_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[115] + mi := &file_tfplugin6_proto_msgTypes[121] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6134,7 +6398,7 @@ type CallFunction_Response struct { func (x *CallFunction_Response) Reset() { *x = CallFunction_Response{} - mi := &file_tfplugin6_proto_msgTypes[116] + mi := &file_tfplugin6_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6146,7 +6410,7 @@ func (x *CallFunction_Response) String() string { func (*CallFunction_Response) ProtoMessage() {} func (x *CallFunction_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[116] + mi := &file_tfplugin6_proto_msgTypes[122] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6194,7 +6458,7 @@ type ListResource_Request struct { func (x *ListResource_Request) Reset() { *x = ListResource_Request{} - mi := &file_tfplugin6_proto_msgTypes[117] + mi := &file_tfplugin6_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6206,7 +6470,7 @@ func (x *ListResource_Request) String() string { func (*ListResource_Request) ProtoMessage() {} func (x *ListResource_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[117] + mi := &file_tfplugin6_proto_msgTypes[123] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6266,7 +6530,7 @@ type ListResource_Event struct { func (x *ListResource_Event) Reset() { *x = ListResource_Event{} - mi := &file_tfplugin6_proto_msgTypes[118] + mi := &file_tfplugin6_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6278,7 +6542,7 @@ func (x *ListResource_Event) String() string { func (*ListResource_Event) ProtoMessage() {} func (x *ListResource_Event) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[118] + mi := &file_tfplugin6_proto_msgTypes[124] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6334,7 +6598,7 @@ type ValidateListResourceConfig_Request struct { func (x *ValidateListResourceConfig_Request) Reset() { *x = ValidateListResourceConfig_Request{} - mi := &file_tfplugin6_proto_msgTypes[119] + mi := &file_tfplugin6_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6346,7 +6610,7 @@ func (x *ValidateListResourceConfig_Request) String() string { func (*ValidateListResourceConfig_Request) ProtoMessage() {} func (x *ValidateListResourceConfig_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[119] + mi := &file_tfplugin6_proto_msgTypes[125] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6390,28 +6654,229 @@ func (x *ValidateListResourceConfig_Request) GetLimit() *DynamicValue { return nil } -type ValidateListResourceConfig_Response struct { - state protoimpl.MessageState `protogen:"open.v1"` - Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` +type ValidateListResourceConfig_Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValidateListResourceConfig_Response) Reset() { + *x = ValidateListResourceConfig_Response{} + mi := &file_tfplugin6_proto_msgTypes[126] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateListResourceConfig_Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateListResourceConfig_Response) ProtoMessage() {} + +func (x *ValidateListResourceConfig_Response) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[126] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateListResourceConfig_Response.ProtoReflect.Descriptor instead. +func (*ValidateListResourceConfig_Response) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{37, 1} +} + +func (x *ValidateListResourceConfig_Response) GetDiagnostics() []*Diagnostic { + if x != nil { + return x.Diagnostics + } + return nil +} + +type ValidateStateStore_Request struct { + state protoimpl.MessageState `protogen:"open.v1"` + TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` + Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValidateStateStore_Request) Reset() { + *x = ValidateStateStore_Request{} + mi := &file_tfplugin6_proto_msgTypes[127] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateStateStore_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateStateStore_Request) ProtoMessage() {} + +func (x *ValidateStateStore_Request) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[127] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateStateStore_Request.ProtoReflect.Descriptor instead. +func (*ValidateStateStore_Request) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{38, 0} +} + +func (x *ValidateStateStore_Request) GetTypeName() string { + if x != nil { + return x.TypeName + } + return "" +} + +func (x *ValidateStateStore_Request) GetConfig() *DynamicValue { + if x != nil { + return x.Config + } + return nil +} + +type ValidateStateStore_Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ValidateStateStore_Response) Reset() { + *x = ValidateStateStore_Response{} + mi := &file_tfplugin6_proto_msgTypes[128] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ValidateStateStore_Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidateStateStore_Response) ProtoMessage() {} + +func (x *ValidateStateStore_Response) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[128] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ValidateStateStore_Response.ProtoReflect.Descriptor instead. +func (*ValidateStateStore_Response) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{38, 1} +} + +func (x *ValidateStateStore_Response) GetDiagnostics() []*Diagnostic { + if x != nil { + return x.Diagnostics + } + return nil +} + +type ConfigureStateStore_Request struct { + state protoimpl.MessageState `protogen:"open.v1"` + TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` + Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + Capabilities *StateStoreClientCapabilities `protobuf:"bytes,3,opt,name=capabilities,proto3" json:"capabilities,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfigureStateStore_Request) Reset() { + *x = ConfigureStateStore_Request{} + mi := &file_tfplugin6_proto_msgTypes[129] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfigureStateStore_Request) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfigureStateStore_Request) ProtoMessage() {} + +func (x *ConfigureStateStore_Request) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[129] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigureStateStore_Request.ProtoReflect.Descriptor instead. +func (*ConfigureStateStore_Request) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{39, 0} +} + +func (x *ConfigureStateStore_Request) GetTypeName() string { + if x != nil { + return x.TypeName + } + return "" +} + +func (x *ConfigureStateStore_Request) GetConfig() *DynamicValue { + if x != nil { + return x.Config + } + return nil +} + +func (x *ConfigureStateStore_Request) GetCapabilities() *StateStoreClientCapabilities { + if x != nil { + return x.Capabilities + } + return nil +} + +type ConfigureStateStore_Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + Capabilities *StateStoreServerCapabilities `protobuf:"bytes,2,opt,name=capabilities,proto3" json:"capabilities,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ValidateListResourceConfig_Response) Reset() { - *x = ValidateListResourceConfig_Response{} - mi := &file_tfplugin6_proto_msgTypes[120] +func (x *ConfigureStateStore_Response) Reset() { + *x = ConfigureStateStore_Response{} + mi := &file_tfplugin6_proto_msgTypes[130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ValidateListResourceConfig_Response) String() string { +func (x *ConfigureStateStore_Response) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ValidateListResourceConfig_Response) ProtoMessage() {} +func (*ConfigureStateStore_Response) ProtoMessage() {} -func (x *ValidateListResourceConfig_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[120] +func (x *ConfigureStateStore_Response) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[130] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6422,41 +6887,48 @@ func (x *ValidateListResourceConfig_Response) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use ValidateListResourceConfig_Response.ProtoReflect.Descriptor instead. -func (*ValidateListResourceConfig_Response) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{37, 1} +// Deprecated: Use ConfigureStateStore_Response.ProtoReflect.Descriptor instead. +func (*ConfigureStateStore_Response) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{39, 1} } -func (x *ValidateListResourceConfig_Response) GetDiagnostics() []*Diagnostic { +func (x *ConfigureStateStore_Response) GetDiagnostics() []*Diagnostic { if x != nil { return x.Diagnostics } return nil } -type ValidateStateStore_Request struct { +func (x *ConfigureStateStore_Response) GetCapabilities() *StateStoreServerCapabilities { + if x != nil { + return x.Capabilities + } + return nil +} + +type ReadStateBytes_Request struct { state protoimpl.MessageState `protogen:"open.v1"` TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` - Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + StateId string `protobuf:"bytes,2,opt,name=state_id,json=stateId,proto3" json:"state_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ValidateStateStore_Request) Reset() { - *x = ValidateStateStore_Request{} - mi := &file_tfplugin6_proto_msgTypes[121] +func (x *ReadStateBytes_Request) Reset() { + *x = ReadStateBytes_Request{} + mi := &file_tfplugin6_proto_msgTypes[131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ValidateStateStore_Request) String() string { +func (x *ReadStateBytes_Request) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ValidateStateStore_Request) ProtoMessage() {} +func (*ReadStateBytes_Request) ProtoMessage() {} -func (x *ValidateStateStore_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[121] +func (x *ReadStateBytes_Request) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[131] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6467,47 +6939,50 @@ func (x *ValidateStateStore_Request) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ValidateStateStore_Request.ProtoReflect.Descriptor instead. -func (*ValidateStateStore_Request) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{38, 0} +// Deprecated: Use ReadStateBytes_Request.ProtoReflect.Descriptor instead. +func (*ReadStateBytes_Request) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{42, 0} } -func (x *ValidateStateStore_Request) GetTypeName() string { +func (x *ReadStateBytes_Request) GetTypeName() string { if x != nil { return x.TypeName } return "" } -func (x *ValidateStateStore_Request) GetConfig() *DynamicValue { +func (x *ReadStateBytes_Request) GetStateId() string { if x != nil { - return x.Config + return x.StateId } - return nil + return "" } -type ValidateStateStore_Response struct { +type ReadStateBytes_Response struct { state protoimpl.MessageState `protogen:"open.v1"` - Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` + Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` + TotalLength int64 `protobuf:"varint,2,opt,name=total_length,json=totalLength,proto3" json:"total_length,omitempty"` + Range *StateRange `protobuf:"bytes,3,opt,name=range,proto3" json:"range,omitempty"` + Diagnostics []*Diagnostic `protobuf:"bytes,4,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ValidateStateStore_Response) Reset() { - *x = ValidateStateStore_Response{} - mi := &file_tfplugin6_proto_msgTypes[122] +func (x *ReadStateBytes_Response) Reset() { + *x = ReadStateBytes_Response{} + mi := &file_tfplugin6_proto_msgTypes[132] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ValidateStateStore_Response) String() string { +func (x *ReadStateBytes_Response) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ValidateStateStore_Response) ProtoMessage() {} +func (*ReadStateBytes_Response) ProtoMessage() {} -func (x *ValidateStateStore_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[122] +func (x *ReadStateBytes_Response) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[132] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6518,41 +6993,65 @@ func (x *ValidateStateStore_Response) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ValidateStateStore_Response.ProtoReflect.Descriptor instead. -func (*ValidateStateStore_Response) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{38, 1} +// Deprecated: Use ReadStateBytes_Response.ProtoReflect.Descriptor instead. +func (*ReadStateBytes_Response) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{42, 1} } -func (x *ValidateStateStore_Response) GetDiagnostics() []*Diagnostic { +func (x *ReadStateBytes_Response) GetBytes() []byte { + if x != nil { + return x.Bytes + } + return nil +} + +func (x *ReadStateBytes_Response) GetTotalLength() int64 { + if x != nil { + return x.TotalLength + } + return 0 +} + +func (x *ReadStateBytes_Response) GetRange() *StateRange { + if x != nil { + return x.Range + } + return nil +} + +func (x *ReadStateBytes_Response) GetDiagnostics() []*Diagnostic { if x != nil { return x.Diagnostics } return nil } -type ConfigureStateStore_Request struct { - state protoimpl.MessageState `protogen:"open.v1"` - TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"` - Config *DynamicValue `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` +type WriteStateBytes_RequestChunk struct { + state protoimpl.MessageState `protogen:"open.v1"` + // meta is sent with the first chunk only + Meta *RequestChunkMeta `protobuf:"bytes,1,opt,name=meta,proto3,oneof" json:"meta,omitempty"` + Bytes []byte `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"` + TotalLength int64 `protobuf:"varint,3,opt,name=total_length,json=totalLength,proto3" json:"total_length,omitempty"` + Range *StateRange `protobuf:"bytes,4,opt,name=range,proto3" json:"range,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ConfigureStateStore_Request) Reset() { - *x = ConfigureStateStore_Request{} - mi := &file_tfplugin6_proto_msgTypes[123] +func (x *WriteStateBytes_RequestChunk) Reset() { + *x = WriteStateBytes_RequestChunk{} + mi := &file_tfplugin6_proto_msgTypes[133] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ConfigureStateStore_Request) String() string { +func (x *WriteStateBytes_RequestChunk) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ConfigureStateStore_Request) ProtoMessage() {} +func (*WriteStateBytes_RequestChunk) ProtoMessage() {} -func (x *ConfigureStateStore_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[123] +func (x *WriteStateBytes_RequestChunk) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[133] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6563,47 +7062,61 @@ func (x *ConfigureStateStore_Request) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ConfigureStateStore_Request.ProtoReflect.Descriptor instead. -func (*ConfigureStateStore_Request) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{39, 0} +// Deprecated: Use WriteStateBytes_RequestChunk.ProtoReflect.Descriptor instead. +func (*WriteStateBytes_RequestChunk) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{43, 0} } -func (x *ConfigureStateStore_Request) GetTypeName() string { +func (x *WriteStateBytes_RequestChunk) GetMeta() *RequestChunkMeta { if x != nil { - return x.TypeName + return x.Meta } - return "" + return nil } -func (x *ConfigureStateStore_Request) GetConfig() *DynamicValue { +func (x *WriteStateBytes_RequestChunk) GetBytes() []byte { if x != nil { - return x.Config + return x.Bytes } return nil } -type ConfigureStateStore_Response struct { +func (x *WriteStateBytes_RequestChunk) GetTotalLength() int64 { + if x != nil { + return x.TotalLength + } + return 0 +} + +func (x *WriteStateBytes_RequestChunk) GetRange() *StateRange { + if x != nil { + return x.Range + } + return nil +} + +type WriteStateBytes_Response struct { state protoimpl.MessageState `protogen:"open.v1"` Diagnostics []*Diagnostic `protobuf:"bytes,1,rep,name=diagnostics,proto3" json:"diagnostics,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *ConfigureStateStore_Response) Reset() { - *x = ConfigureStateStore_Response{} - mi := &file_tfplugin6_proto_msgTypes[124] +func (x *WriteStateBytes_Response) Reset() { + *x = WriteStateBytes_Response{} + mi := &file_tfplugin6_proto_msgTypes[134] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *ConfigureStateStore_Response) String() string { +func (x *WriteStateBytes_Response) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ConfigureStateStore_Response) ProtoMessage() {} +func (*WriteStateBytes_Response) ProtoMessage() {} -func (x *ConfigureStateStore_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[124] +func (x *WriteStateBytes_Response) ProtoReflect() protoreflect.Message { + mi := &file_tfplugin6_proto_msgTypes[134] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6614,12 +7127,12 @@ func (x *ConfigureStateStore_Response) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ConfigureStateStore_Response.ProtoReflect.Descriptor instead. -func (*ConfigureStateStore_Response) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{39, 1} +// Deprecated: Use WriteStateBytes_Response.ProtoReflect.Descriptor instead. +func (*WriteStateBytes_Response) Descriptor() ([]byte, []int) { + return file_tfplugin6_proto_rawDescGZIP(), []int{43, 1} } -func (x *ConfigureStateStore_Response) GetDiagnostics() []*Diagnostic { +func (x *WriteStateBytes_Response) GetDiagnostics() []*Diagnostic { if x != nil { return x.Diagnostics } @@ -6635,7 +7148,7 @@ type GetStates_Request struct { func (x *GetStates_Request) Reset() { *x = GetStates_Request{} - mi := &file_tfplugin6_proto_msgTypes[125] + mi := &file_tfplugin6_proto_msgTypes[135] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6647,7 +7160,7 @@ func (x *GetStates_Request) String() string { func (*GetStates_Request) ProtoMessage() {} func (x *GetStates_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[125] + mi := &file_tfplugin6_proto_msgTypes[135] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6660,7 +7173,7 @@ func (x *GetStates_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStates_Request.ProtoReflect.Descriptor instead. func (*GetStates_Request) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{40, 0} + return file_tfplugin6_proto_rawDescGZIP(), []int{46, 0} } func (x *GetStates_Request) GetTypeName() string { @@ -6680,7 +7193,7 @@ type GetStates_Response struct { func (x *GetStates_Response) Reset() { *x = GetStates_Response{} - mi := &file_tfplugin6_proto_msgTypes[126] + mi := &file_tfplugin6_proto_msgTypes[136] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6692,7 +7205,7 @@ func (x *GetStates_Response) String() string { func (*GetStates_Response) ProtoMessage() {} func (x *GetStates_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[126] + mi := &file_tfplugin6_proto_msgTypes[136] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6705,7 +7218,7 @@ func (x *GetStates_Response) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStates_Response.ProtoReflect.Descriptor instead. func (*GetStates_Response) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{40, 1} + return file_tfplugin6_proto_rawDescGZIP(), []int{46, 1} } func (x *GetStates_Response) GetStateId() []string { @@ -6732,7 +7245,7 @@ type DeleteState_Request struct { func (x *DeleteState_Request) Reset() { *x = DeleteState_Request{} - mi := &file_tfplugin6_proto_msgTypes[127] + mi := &file_tfplugin6_proto_msgTypes[137] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6744,7 +7257,7 @@ func (x *DeleteState_Request) String() string { func (*DeleteState_Request) ProtoMessage() {} func (x *DeleteState_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[127] + mi := &file_tfplugin6_proto_msgTypes[137] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6757,7 +7270,7 @@ func (x *DeleteState_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteState_Request.ProtoReflect.Descriptor instead. func (*DeleteState_Request) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{41, 0} + return file_tfplugin6_proto_rawDescGZIP(), []int{47, 0} } func (x *DeleteState_Request) GetTypeName() string { @@ -6783,7 +7296,7 @@ type DeleteState_Response struct { func (x *DeleteState_Response) Reset() { *x = DeleteState_Response{} - mi := &file_tfplugin6_proto_msgTypes[128] + mi := &file_tfplugin6_proto_msgTypes[138] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6795,7 +7308,7 @@ func (x *DeleteState_Response) String() string { func (*DeleteState_Response) ProtoMessage() {} func (x *DeleteState_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[128] + mi := &file_tfplugin6_proto_msgTypes[138] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6808,7 +7321,7 @@ func (x *DeleteState_Response) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteState_Response.ProtoReflect.Descriptor instead. func (*DeleteState_Response) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{41, 1} + return file_tfplugin6_proto_rawDescGZIP(), []int{47, 1} } func (x *DeleteState_Response) GetDiagnostics() []*Diagnostic { @@ -6831,7 +7344,7 @@ type PlanAction_Request struct { func (x *PlanAction_Request) Reset() { *x = PlanAction_Request{} - mi := &file_tfplugin6_proto_msgTypes[129] + mi := &file_tfplugin6_proto_msgTypes[139] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6843,7 +7356,7 @@ func (x *PlanAction_Request) String() string { func (*PlanAction_Request) ProtoMessage() {} func (x *PlanAction_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[129] + mi := &file_tfplugin6_proto_msgTypes[139] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6856,7 +7369,7 @@ func (x *PlanAction_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use PlanAction_Request.ProtoReflect.Descriptor instead. func (*PlanAction_Request) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{42, 0} + return file_tfplugin6_proto_rawDescGZIP(), []int{48, 0} } func (x *PlanAction_Request) GetActionType() string { @@ -6891,7 +7404,7 @@ type PlanAction_Response struct { func (x *PlanAction_Response) Reset() { *x = PlanAction_Response{} - mi := &file_tfplugin6_proto_msgTypes[130] + mi := &file_tfplugin6_proto_msgTypes[140] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6903,7 +7416,7 @@ func (x *PlanAction_Response) String() string { func (*PlanAction_Response) ProtoMessage() {} func (x *PlanAction_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[130] + mi := &file_tfplugin6_proto_msgTypes[140] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6916,7 +7429,7 @@ func (x *PlanAction_Response) ProtoReflect() protoreflect.Message { // Deprecated: Use PlanAction_Response.ProtoReflect.Descriptor instead. func (*PlanAction_Response) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{42, 1} + return file_tfplugin6_proto_rawDescGZIP(), []int{48, 1} } func (x *PlanAction_Response) GetDiagnostics() []*Diagnostic { @@ -6946,7 +7459,7 @@ type InvokeAction_Request struct { func (x *InvokeAction_Request) Reset() { *x = InvokeAction_Request{} - mi := &file_tfplugin6_proto_msgTypes[131] + mi := &file_tfplugin6_proto_msgTypes[141] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6958,7 +7471,7 @@ func (x *InvokeAction_Request) String() string { func (*InvokeAction_Request) ProtoMessage() {} func (x *InvokeAction_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[131] + mi := &file_tfplugin6_proto_msgTypes[141] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6971,7 +7484,7 @@ func (x *InvokeAction_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use InvokeAction_Request.ProtoReflect.Descriptor instead. func (*InvokeAction_Request) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{43, 0} + return file_tfplugin6_proto_rawDescGZIP(), []int{49, 0} } func (x *InvokeAction_Request) GetActionType() string { @@ -7008,7 +7521,7 @@ type InvokeAction_Event struct { func (x *InvokeAction_Event) Reset() { *x = InvokeAction_Event{} - mi := &file_tfplugin6_proto_msgTypes[132] + mi := &file_tfplugin6_proto_msgTypes[142] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7020,7 +7533,7 @@ func (x *InvokeAction_Event) String() string { func (*InvokeAction_Event) ProtoMessage() {} func (x *InvokeAction_Event) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[132] + mi := &file_tfplugin6_proto_msgTypes[142] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7033,7 +7546,7 @@ func (x *InvokeAction_Event) ProtoReflect() protoreflect.Message { // Deprecated: Use InvokeAction_Event.ProtoReflect.Descriptor instead. func (*InvokeAction_Event) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{43, 1} + return file_tfplugin6_proto_rawDescGZIP(), []int{49, 1} } func (x *InvokeAction_Event) GetType() isInvokeAction_Event_Type { @@ -7087,7 +7600,7 @@ type InvokeAction_Event_Progress struct { func (x *InvokeAction_Event_Progress) Reset() { *x = InvokeAction_Event_Progress{} - mi := &file_tfplugin6_proto_msgTypes[133] + mi := &file_tfplugin6_proto_msgTypes[143] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7099,7 +7612,7 @@ func (x *InvokeAction_Event_Progress) String() string { func (*InvokeAction_Event_Progress) ProtoMessage() {} func (x *InvokeAction_Event_Progress) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[133] + mi := &file_tfplugin6_proto_msgTypes[143] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7112,7 +7625,7 @@ func (x *InvokeAction_Event_Progress) ProtoReflect() protoreflect.Message { // Deprecated: Use InvokeAction_Event_Progress.ProtoReflect.Descriptor instead. func (*InvokeAction_Event_Progress) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{43, 1, 0} + return file_tfplugin6_proto_rawDescGZIP(), []int{49, 1, 0} } func (x *InvokeAction_Event_Progress) GetMessage() string { @@ -7131,7 +7644,7 @@ type InvokeAction_Event_Completed struct { func (x *InvokeAction_Event_Completed) Reset() { *x = InvokeAction_Event_Completed{} - mi := &file_tfplugin6_proto_msgTypes[134] + mi := &file_tfplugin6_proto_msgTypes[144] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7143,7 +7656,7 @@ func (x *InvokeAction_Event_Completed) String() string { func (*InvokeAction_Event_Completed) ProtoMessage() {} func (x *InvokeAction_Event_Completed) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[134] + mi := &file_tfplugin6_proto_msgTypes[144] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7156,7 +7669,7 @@ func (x *InvokeAction_Event_Completed) ProtoReflect() protoreflect.Message { // Deprecated: Use InvokeAction_Event_Completed.ProtoReflect.Descriptor instead. func (*InvokeAction_Event_Completed) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{43, 1, 1} + return file_tfplugin6_proto_rawDescGZIP(), []int{49, 1, 1} } func (x *InvokeAction_Event_Completed) GetDiagnostics() []*Diagnostic { @@ -7176,7 +7689,7 @@ type ValidateActionConfig_Request struct { func (x *ValidateActionConfig_Request) Reset() { *x = ValidateActionConfig_Request{} - mi := &file_tfplugin6_proto_msgTypes[135] + mi := &file_tfplugin6_proto_msgTypes[145] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7188,7 +7701,7 @@ func (x *ValidateActionConfig_Request) String() string { func (*ValidateActionConfig_Request) ProtoMessage() {} func (x *ValidateActionConfig_Request) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[135] + mi := &file_tfplugin6_proto_msgTypes[145] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7201,7 +7714,7 @@ func (x *ValidateActionConfig_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateActionConfig_Request.ProtoReflect.Descriptor instead. func (*ValidateActionConfig_Request) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{44, 0} + return file_tfplugin6_proto_rawDescGZIP(), []int{50, 0} } func (x *ValidateActionConfig_Request) GetTypeName() string { @@ -7227,7 +7740,7 @@ type ValidateActionConfig_Response struct { func (x *ValidateActionConfig_Response) Reset() { *x = ValidateActionConfig_Response{} - mi := &file_tfplugin6_proto_msgTypes[136] + mi := &file_tfplugin6_proto_msgTypes[146] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7239,7 +7752,7 @@ func (x *ValidateActionConfig_Response) String() string { func (*ValidateActionConfig_Response) ProtoMessage() {} func (x *ValidateActionConfig_Response) ProtoReflect() protoreflect.Message { - mi := &file_tfplugin6_proto_msgTypes[136] + mi := &file_tfplugin6_proto_msgTypes[146] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7252,7 +7765,7 @@ func (x *ValidateActionConfig_Response) ProtoReflect() protoreflect.Message { // Deprecated: Use ValidateActionConfig_Response.ProtoReflect.Descriptor instead. func (*ValidateActionConfig_Response) Descriptor() ([]byte, []int) { - return file_tfplugin6_proto_rawDescGZIP(), []int{44, 1} + return file_tfplugin6_proto_rawDescGZIP(), []int{50, 1} } func (x *ValidateActionConfig_Response) GetDiagnostics() []*Diagnostic { @@ -7700,13 +8213,46 @@ const file_tfplugin6_proto_rawDesc = "" + "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" + "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x1aC\n" + "\bResponse\x127\n" + - "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\xb3\x01\n" + - "\x13ConfigureStateStore\x1aW\n" + + "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\xcf\x02\n" + + "\x13ConfigureStateStore\x1a\xa4\x01\n" + "\aRequest\x12\x1b\n" + "\ttype_name\x18\x01 \x01(\tR\btypeName\x12/\n" + - "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x1aC\n" + + "\x06config\x18\x02 \x01(\v2\x17.tfplugin6.DynamicValueR\x06config\x12K\n" + + "\fcapabilities\x18\x03 \x01(\v2'.tfplugin6.StateStoreClientCapabilitiesR\fcapabilities\x1a\x90\x01\n" + + "\bResponse\x127\n" + + "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\x12K\n" + + "\fcapabilities\x18\x02 \x01(\v2'.tfplugin6.StateStoreServerCapabilitiesR\fcapabilities\"=\n" + + "\x1cStateStoreClientCapabilities\x12\x1d\n" + + "\n" + + "chunk_size\x18\x01 \x01(\x03R\tchunkSize\"=\n" + + "\x1cStateStoreServerCapabilities\x12\x1d\n" + + "\n" + + "chunk_size\x18\x01 \x01(\x03R\tchunkSize\"\xff\x01\n" + + "\x0eReadStateBytes\x1aA\n" + + "\aRequest\x12\x1b\n" + + "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x19\n" + + "\bstate_id\x18\x02 \x01(\tR\astateId\x1a\xa9\x01\n" + + "\bResponse\x12\x14\n" + + "\x05bytes\x18\x01 \x01(\fR\x05bytes\x12!\n" + + "\ftotal_length\x18\x02 \x01(\x03R\vtotalLength\x12+\n" + + "\x05range\x18\x03 \x01(\v2\x15.tfplugin6.StateRangeR\x05range\x127\n" + + "\vdiagnostics\x18\x04 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\x8c\x02\n" + + "\x0fWriteStateBytes\x1a\xb3\x01\n" + + "\fRequestChunk\x124\n" + + "\x04meta\x18\x01 \x01(\v2\x1b.tfplugin6.RequestChunkMetaH\x00R\x04meta\x88\x01\x01\x12\x14\n" + + "\x05bytes\x18\x02 \x01(\fR\x05bytes\x12!\n" + + "\ftotal_length\x18\x03 \x01(\x03R\vtotalLength\x12+\n" + + "\x05range\x18\x04 \x01(\v2\x15.tfplugin6.StateRangeR\x05rangeB\a\n" + + "\x05_meta\x1aC\n" + "\bResponse\x127\n" + - "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"\x93\x01\n" + + "\vdiagnostics\x18\x01 \x03(\v2\x15.tfplugin6.DiagnosticR\vdiagnostics\"J\n" + + "\x10RequestChunkMeta\x12\x1b\n" + + "\ttype_name\x18\x01 \x01(\tR\btypeName\x12\x19\n" + + "\bstate_id\x18\x02 \x01(\tR\astateId\"4\n" + + "\n" + + "StateRange\x12\x14\n" + + "\x05start\x18\x01 \x01(\x03R\x05start\x12\x10\n" + + "\x03end\x18\x02 \x01(\x03R\x03end\"\x93\x01\n" + "\tGetStates\x1a&\n" + "\aRequest\x12\x1b\n" + "\ttype_name\x18\x01 \x01(\tR\btypeName\x1a^\n" + @@ -7752,7 +8298,7 @@ const file_tfplugin6_proto_rawDesc = "" + "\n" + "StringKind\x12\t\n" + "\x05PLAIN\x10\x00\x12\f\n" + - "\bMARKDOWN\x10\x012\xa9\x19\n" + + "\bMARKDOWN\x10\x012\xe7\x1a\n" + "\bProvider\x12N\n" + "\vGetMetadata\x12\x1e.tfplugin6.GetMetadata.Request\x1a\x1f.tfplugin6.GetMetadata.Response\x12`\n" + "\x11GetProviderSchema\x12$.tfplugin6.GetProviderSchema.Request\x1a%.tfplugin6.GetProviderSchema.Response\x12o\n" + @@ -7779,7 +8325,9 @@ const file_tfplugin6_proto_rawDesc = "" + "\fGetFunctions\x12\x1f.tfplugin6.GetFunctions.Request\x1a .tfplugin6.GetFunctions.Response\x12Q\n" + "\fCallFunction\x12\x1f.tfplugin6.CallFunction.Request\x1a .tfplugin6.CallFunction.Response\x12i\n" + "\x18ValidateStateStoreConfig\x12%.tfplugin6.ValidateStateStore.Request\x1a&.tfplugin6.ValidateStateStore.Response\x12f\n" + - "\x13ConfigureStateStore\x12&.tfplugin6.ConfigureStateStore.Request\x1a'.tfplugin6.ConfigureStateStore.Response\x12H\n" + + "\x13ConfigureStateStore\x12&.tfplugin6.ConfigureStateStore.Request\x1a'.tfplugin6.ConfigureStateStore.Response\x12Y\n" + + "\x0eReadStateBytes\x12!.tfplugin6.ReadStateBytes.Request\x1a\".tfplugin6.ReadStateBytes.Response0\x01\x12a\n" + + "\x0fWriteStateBytes\x12'.tfplugin6.WriteStateBytes.RequestChunk\x1a#.tfplugin6.WriteStateBytes.Response(\x01\x12H\n" + "\tGetStates\x12\x1c.tfplugin6.GetStates.Request\x1a\x1d.tfplugin6.GetStates.Response\x12N\n" + "\vDeleteState\x12\x1e.tfplugin6.DeleteState.Request\x1a\x1f.tfplugin6.DeleteState.Response\x12K\n" + "\n" + @@ -7801,7 +8349,7 @@ func file_tfplugin6_proto_rawDescGZIP() []byte { } var file_tfplugin6_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_tfplugin6_proto_msgTypes = make([]protoimpl.MessageInfo, 137) +var file_tfplugin6_proto_msgTypes = make([]protoimpl.MessageInfo, 147) var file_tfplugin6_proto_goTypes = []any{ (StringKind)(0), // 0: tfplugin6.StringKind (Diagnostic_Severity)(0), // 1: tfplugin6.Diagnostic.Severity @@ -7848,146 +8396,156 @@ var file_tfplugin6_proto_goTypes = []any{ (*ValidateListResourceConfig)(nil), // 42: tfplugin6.ValidateListResourceConfig (*ValidateStateStore)(nil), // 43: tfplugin6.ValidateStateStore (*ConfigureStateStore)(nil), // 44: tfplugin6.ConfigureStateStore - (*GetStates)(nil), // 45: tfplugin6.GetStates - (*DeleteState)(nil), // 46: tfplugin6.DeleteState - (*PlanAction)(nil), // 47: tfplugin6.PlanAction - (*InvokeAction)(nil), // 48: tfplugin6.InvokeAction - (*ValidateActionConfig)(nil), // 49: tfplugin6.ValidateActionConfig - (*AttributePath_Step)(nil), // 50: tfplugin6.AttributePath.Step - (*StopProvider_Request)(nil), // 51: tfplugin6.StopProvider.Request - (*StopProvider_Response)(nil), // 52: tfplugin6.StopProvider.Response - nil, // 53: tfplugin6.RawState.FlatmapEntry - (*ResourceIdentitySchema_IdentityAttribute)(nil), // 54: tfplugin6.ResourceIdentitySchema.IdentityAttribute - (*Schema_Block)(nil), // 55: tfplugin6.Schema.Block - (*Schema_Attribute)(nil), // 56: tfplugin6.Schema.Attribute - (*Schema_NestedBlock)(nil), // 57: tfplugin6.Schema.NestedBlock - (*Schema_Object)(nil), // 58: tfplugin6.Schema.Object - (*Function_Parameter)(nil), // 59: tfplugin6.Function.Parameter - (*Function_Return)(nil), // 60: tfplugin6.Function.Return - (*GetMetadata_Request)(nil), // 61: tfplugin6.GetMetadata.Request - (*GetMetadata_Response)(nil), // 62: tfplugin6.GetMetadata.Response - (*GetMetadata_EphemeralMetadata)(nil), // 63: tfplugin6.GetMetadata.EphemeralMetadata - (*GetMetadata_FunctionMetadata)(nil), // 64: tfplugin6.GetMetadata.FunctionMetadata - (*GetMetadata_DataSourceMetadata)(nil), // 65: tfplugin6.GetMetadata.DataSourceMetadata - (*GetMetadata_ResourceMetadata)(nil), // 66: tfplugin6.GetMetadata.ResourceMetadata - (*GetMetadata_ListResourceMetadata)(nil), // 67: tfplugin6.GetMetadata.ListResourceMetadata - (*GetMetadata_StateStoreMetadata)(nil), // 68: tfplugin6.GetMetadata.StateStoreMetadata - (*GetMetadata_ActionMetadata)(nil), // 69: tfplugin6.GetMetadata.ActionMetadata - (*GetProviderSchema_Request)(nil), // 70: tfplugin6.GetProviderSchema.Request - (*GetProviderSchema_Response)(nil), // 71: tfplugin6.GetProviderSchema.Response - nil, // 72: tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry - nil, // 73: tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry - nil, // 74: tfplugin6.GetProviderSchema.Response.FunctionsEntry - nil, // 75: tfplugin6.GetProviderSchema.Response.EphemeralResourceSchemasEntry - nil, // 76: tfplugin6.GetProviderSchema.Response.ListResourceSchemasEntry - nil, // 77: tfplugin6.GetProviderSchema.Response.StateStoreSchemasEntry - nil, // 78: tfplugin6.GetProviderSchema.Response.ActionSchemasEntry - (*ValidateProviderConfig_Request)(nil), // 79: tfplugin6.ValidateProviderConfig.Request - (*ValidateProviderConfig_Response)(nil), // 80: tfplugin6.ValidateProviderConfig.Response - (*UpgradeResourceState_Request)(nil), // 81: tfplugin6.UpgradeResourceState.Request - (*UpgradeResourceState_Response)(nil), // 82: tfplugin6.UpgradeResourceState.Response - (*GetResourceIdentitySchemas_Request)(nil), // 83: tfplugin6.GetResourceIdentitySchemas.Request - (*GetResourceIdentitySchemas_Response)(nil), // 84: tfplugin6.GetResourceIdentitySchemas.Response - nil, // 85: tfplugin6.GetResourceIdentitySchemas.Response.IdentitySchemasEntry - (*UpgradeResourceIdentity_Request)(nil), // 86: tfplugin6.UpgradeResourceIdentity.Request - (*UpgradeResourceIdentity_Response)(nil), // 87: tfplugin6.UpgradeResourceIdentity.Response - (*ValidateResourceConfig_Request)(nil), // 88: tfplugin6.ValidateResourceConfig.Request - (*ValidateResourceConfig_Response)(nil), // 89: tfplugin6.ValidateResourceConfig.Response - (*ValidateDataResourceConfig_Request)(nil), // 90: tfplugin6.ValidateDataResourceConfig.Request - (*ValidateDataResourceConfig_Response)(nil), // 91: tfplugin6.ValidateDataResourceConfig.Response - (*ValidateEphemeralResourceConfig_Request)(nil), // 92: tfplugin6.ValidateEphemeralResourceConfig.Request - (*ValidateEphemeralResourceConfig_Response)(nil), // 93: tfplugin6.ValidateEphemeralResourceConfig.Response - (*ConfigureProvider_Request)(nil), // 94: tfplugin6.ConfigureProvider.Request - (*ConfigureProvider_Response)(nil), // 95: tfplugin6.ConfigureProvider.Response - (*ReadResource_Request)(nil), // 96: tfplugin6.ReadResource.Request - (*ReadResource_Response)(nil), // 97: tfplugin6.ReadResource.Response - (*PlanResourceChange_Request)(nil), // 98: tfplugin6.PlanResourceChange.Request - (*PlanResourceChange_Response)(nil), // 99: tfplugin6.PlanResourceChange.Response - (*ApplyResourceChange_Request)(nil), // 100: tfplugin6.ApplyResourceChange.Request - (*ApplyResourceChange_Response)(nil), // 101: tfplugin6.ApplyResourceChange.Response - (*ImportResourceState_Request)(nil), // 102: tfplugin6.ImportResourceState.Request - (*ImportResourceState_ImportedResource)(nil), // 103: tfplugin6.ImportResourceState.ImportedResource - (*ImportResourceState_Response)(nil), // 104: tfplugin6.ImportResourceState.Response - (*GenerateResourceConfig_Request)(nil), // 105: tfplugin6.GenerateResourceConfig.Request - (*GenerateResourceConfig_Response)(nil), // 106: tfplugin6.GenerateResourceConfig.Response - (*MoveResourceState_Request)(nil), // 107: tfplugin6.MoveResourceState.Request - (*MoveResourceState_Response)(nil), // 108: tfplugin6.MoveResourceState.Response - (*ReadDataSource_Request)(nil), // 109: tfplugin6.ReadDataSource.Request - (*ReadDataSource_Response)(nil), // 110: tfplugin6.ReadDataSource.Response - (*OpenEphemeralResource_Request)(nil), // 111: tfplugin6.OpenEphemeralResource.Request - (*OpenEphemeralResource_Response)(nil), // 112: tfplugin6.OpenEphemeralResource.Response - (*RenewEphemeralResource_Request)(nil), // 113: tfplugin6.RenewEphemeralResource.Request - (*RenewEphemeralResource_Response)(nil), // 114: tfplugin6.RenewEphemeralResource.Response - (*CloseEphemeralResource_Request)(nil), // 115: tfplugin6.CloseEphemeralResource.Request - (*CloseEphemeralResource_Response)(nil), // 116: tfplugin6.CloseEphemeralResource.Response - (*GetFunctions_Request)(nil), // 117: tfplugin6.GetFunctions.Request - (*GetFunctions_Response)(nil), // 118: tfplugin6.GetFunctions.Response - nil, // 119: tfplugin6.GetFunctions.Response.FunctionsEntry - (*CallFunction_Request)(nil), // 120: tfplugin6.CallFunction.Request - (*CallFunction_Response)(nil), // 121: tfplugin6.CallFunction.Response - (*ListResource_Request)(nil), // 122: tfplugin6.ListResource.Request - (*ListResource_Event)(nil), // 123: tfplugin6.ListResource.Event - (*ValidateListResourceConfig_Request)(nil), // 124: tfplugin6.ValidateListResourceConfig.Request - (*ValidateListResourceConfig_Response)(nil), // 125: tfplugin6.ValidateListResourceConfig.Response - (*ValidateStateStore_Request)(nil), // 126: tfplugin6.ValidateStateStore.Request - (*ValidateStateStore_Response)(nil), // 127: tfplugin6.ValidateStateStore.Response - (*ConfigureStateStore_Request)(nil), // 128: tfplugin6.ConfigureStateStore.Request - (*ConfigureStateStore_Response)(nil), // 129: tfplugin6.ConfigureStateStore.Response - (*GetStates_Request)(nil), // 130: tfplugin6.GetStates.Request - (*GetStates_Response)(nil), // 131: tfplugin6.GetStates.Response - (*DeleteState_Request)(nil), // 132: tfplugin6.DeleteState.Request - (*DeleteState_Response)(nil), // 133: tfplugin6.DeleteState.Response - (*PlanAction_Request)(nil), // 134: tfplugin6.PlanAction.Request - (*PlanAction_Response)(nil), // 135: tfplugin6.PlanAction.Response - (*InvokeAction_Request)(nil), // 136: tfplugin6.InvokeAction.Request - (*InvokeAction_Event)(nil), // 137: tfplugin6.InvokeAction.Event - (*InvokeAction_Event_Progress)(nil), // 138: tfplugin6.InvokeAction.Event.Progress - (*InvokeAction_Event_Completed)(nil), // 139: tfplugin6.InvokeAction.Event.Completed - (*ValidateActionConfig_Request)(nil), // 140: tfplugin6.ValidateActionConfig.Request - (*ValidateActionConfig_Response)(nil), // 141: tfplugin6.ValidateActionConfig.Response - (*timestamppb.Timestamp)(nil), // 142: google.protobuf.Timestamp + (*StateStoreClientCapabilities)(nil), // 45: tfplugin6.StateStoreClientCapabilities + (*StateStoreServerCapabilities)(nil), // 46: tfplugin6.StateStoreServerCapabilities + (*ReadStateBytes)(nil), // 47: tfplugin6.ReadStateBytes + (*WriteStateBytes)(nil), // 48: tfplugin6.WriteStateBytes + (*RequestChunkMeta)(nil), // 49: tfplugin6.RequestChunkMeta + (*StateRange)(nil), // 50: tfplugin6.StateRange + (*GetStates)(nil), // 51: tfplugin6.GetStates + (*DeleteState)(nil), // 52: tfplugin6.DeleteState + (*PlanAction)(nil), // 53: tfplugin6.PlanAction + (*InvokeAction)(nil), // 54: tfplugin6.InvokeAction + (*ValidateActionConfig)(nil), // 55: tfplugin6.ValidateActionConfig + (*AttributePath_Step)(nil), // 56: tfplugin6.AttributePath.Step + (*StopProvider_Request)(nil), // 57: tfplugin6.StopProvider.Request + (*StopProvider_Response)(nil), // 58: tfplugin6.StopProvider.Response + nil, // 59: tfplugin6.RawState.FlatmapEntry + (*ResourceIdentitySchema_IdentityAttribute)(nil), // 60: tfplugin6.ResourceIdentitySchema.IdentityAttribute + (*Schema_Block)(nil), // 61: tfplugin6.Schema.Block + (*Schema_Attribute)(nil), // 62: tfplugin6.Schema.Attribute + (*Schema_NestedBlock)(nil), // 63: tfplugin6.Schema.NestedBlock + (*Schema_Object)(nil), // 64: tfplugin6.Schema.Object + (*Function_Parameter)(nil), // 65: tfplugin6.Function.Parameter + (*Function_Return)(nil), // 66: tfplugin6.Function.Return + (*GetMetadata_Request)(nil), // 67: tfplugin6.GetMetadata.Request + (*GetMetadata_Response)(nil), // 68: tfplugin6.GetMetadata.Response + (*GetMetadata_EphemeralMetadata)(nil), // 69: tfplugin6.GetMetadata.EphemeralMetadata + (*GetMetadata_FunctionMetadata)(nil), // 70: tfplugin6.GetMetadata.FunctionMetadata + (*GetMetadata_DataSourceMetadata)(nil), // 71: tfplugin6.GetMetadata.DataSourceMetadata + (*GetMetadata_ResourceMetadata)(nil), // 72: tfplugin6.GetMetadata.ResourceMetadata + (*GetMetadata_ListResourceMetadata)(nil), // 73: tfplugin6.GetMetadata.ListResourceMetadata + (*GetMetadata_StateStoreMetadata)(nil), // 74: tfplugin6.GetMetadata.StateStoreMetadata + (*GetMetadata_ActionMetadata)(nil), // 75: tfplugin6.GetMetadata.ActionMetadata + (*GetProviderSchema_Request)(nil), // 76: tfplugin6.GetProviderSchema.Request + (*GetProviderSchema_Response)(nil), // 77: tfplugin6.GetProviderSchema.Response + nil, // 78: tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry + nil, // 79: tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry + nil, // 80: tfplugin6.GetProviderSchema.Response.FunctionsEntry + nil, // 81: tfplugin6.GetProviderSchema.Response.EphemeralResourceSchemasEntry + nil, // 82: tfplugin6.GetProviderSchema.Response.ListResourceSchemasEntry + nil, // 83: tfplugin6.GetProviderSchema.Response.StateStoreSchemasEntry + nil, // 84: tfplugin6.GetProviderSchema.Response.ActionSchemasEntry + (*ValidateProviderConfig_Request)(nil), // 85: tfplugin6.ValidateProviderConfig.Request + (*ValidateProviderConfig_Response)(nil), // 86: tfplugin6.ValidateProviderConfig.Response + (*UpgradeResourceState_Request)(nil), // 87: tfplugin6.UpgradeResourceState.Request + (*UpgradeResourceState_Response)(nil), // 88: tfplugin6.UpgradeResourceState.Response + (*GetResourceIdentitySchemas_Request)(nil), // 89: tfplugin6.GetResourceIdentitySchemas.Request + (*GetResourceIdentitySchemas_Response)(nil), // 90: tfplugin6.GetResourceIdentitySchemas.Response + nil, // 91: tfplugin6.GetResourceIdentitySchemas.Response.IdentitySchemasEntry + (*UpgradeResourceIdentity_Request)(nil), // 92: tfplugin6.UpgradeResourceIdentity.Request + (*UpgradeResourceIdentity_Response)(nil), // 93: tfplugin6.UpgradeResourceIdentity.Response + (*ValidateResourceConfig_Request)(nil), // 94: tfplugin6.ValidateResourceConfig.Request + (*ValidateResourceConfig_Response)(nil), // 95: tfplugin6.ValidateResourceConfig.Response + (*ValidateDataResourceConfig_Request)(nil), // 96: tfplugin6.ValidateDataResourceConfig.Request + (*ValidateDataResourceConfig_Response)(nil), // 97: tfplugin6.ValidateDataResourceConfig.Response + (*ValidateEphemeralResourceConfig_Request)(nil), // 98: tfplugin6.ValidateEphemeralResourceConfig.Request + (*ValidateEphemeralResourceConfig_Response)(nil), // 99: tfplugin6.ValidateEphemeralResourceConfig.Response + (*ConfigureProvider_Request)(nil), // 100: tfplugin6.ConfigureProvider.Request + (*ConfigureProvider_Response)(nil), // 101: tfplugin6.ConfigureProvider.Response + (*ReadResource_Request)(nil), // 102: tfplugin6.ReadResource.Request + (*ReadResource_Response)(nil), // 103: tfplugin6.ReadResource.Response + (*PlanResourceChange_Request)(nil), // 104: tfplugin6.PlanResourceChange.Request + (*PlanResourceChange_Response)(nil), // 105: tfplugin6.PlanResourceChange.Response + (*ApplyResourceChange_Request)(nil), // 106: tfplugin6.ApplyResourceChange.Request + (*ApplyResourceChange_Response)(nil), // 107: tfplugin6.ApplyResourceChange.Response + (*ImportResourceState_Request)(nil), // 108: tfplugin6.ImportResourceState.Request + (*ImportResourceState_ImportedResource)(nil), // 109: tfplugin6.ImportResourceState.ImportedResource + (*ImportResourceState_Response)(nil), // 110: tfplugin6.ImportResourceState.Response + (*GenerateResourceConfig_Request)(nil), // 111: tfplugin6.GenerateResourceConfig.Request + (*GenerateResourceConfig_Response)(nil), // 112: tfplugin6.GenerateResourceConfig.Response + (*MoveResourceState_Request)(nil), // 113: tfplugin6.MoveResourceState.Request + (*MoveResourceState_Response)(nil), // 114: tfplugin6.MoveResourceState.Response + (*ReadDataSource_Request)(nil), // 115: tfplugin6.ReadDataSource.Request + (*ReadDataSource_Response)(nil), // 116: tfplugin6.ReadDataSource.Response + (*OpenEphemeralResource_Request)(nil), // 117: tfplugin6.OpenEphemeralResource.Request + (*OpenEphemeralResource_Response)(nil), // 118: tfplugin6.OpenEphemeralResource.Response + (*RenewEphemeralResource_Request)(nil), // 119: tfplugin6.RenewEphemeralResource.Request + (*RenewEphemeralResource_Response)(nil), // 120: tfplugin6.RenewEphemeralResource.Response + (*CloseEphemeralResource_Request)(nil), // 121: tfplugin6.CloseEphemeralResource.Request + (*CloseEphemeralResource_Response)(nil), // 122: tfplugin6.CloseEphemeralResource.Response + (*GetFunctions_Request)(nil), // 123: tfplugin6.GetFunctions.Request + (*GetFunctions_Response)(nil), // 124: tfplugin6.GetFunctions.Response + nil, // 125: tfplugin6.GetFunctions.Response.FunctionsEntry + (*CallFunction_Request)(nil), // 126: tfplugin6.CallFunction.Request + (*CallFunction_Response)(nil), // 127: tfplugin6.CallFunction.Response + (*ListResource_Request)(nil), // 128: tfplugin6.ListResource.Request + (*ListResource_Event)(nil), // 129: tfplugin6.ListResource.Event + (*ValidateListResourceConfig_Request)(nil), // 130: tfplugin6.ValidateListResourceConfig.Request + (*ValidateListResourceConfig_Response)(nil), // 131: tfplugin6.ValidateListResourceConfig.Response + (*ValidateStateStore_Request)(nil), // 132: tfplugin6.ValidateStateStore.Request + (*ValidateStateStore_Response)(nil), // 133: tfplugin6.ValidateStateStore.Response + (*ConfigureStateStore_Request)(nil), // 134: tfplugin6.ConfigureStateStore.Request + (*ConfigureStateStore_Response)(nil), // 135: tfplugin6.ConfigureStateStore.Response + (*ReadStateBytes_Request)(nil), // 136: tfplugin6.ReadStateBytes.Request + (*ReadStateBytes_Response)(nil), // 137: tfplugin6.ReadStateBytes.Response + (*WriteStateBytes_RequestChunk)(nil), // 138: tfplugin6.WriteStateBytes.RequestChunk + (*WriteStateBytes_Response)(nil), // 139: tfplugin6.WriteStateBytes.Response + (*GetStates_Request)(nil), // 140: tfplugin6.GetStates.Request + (*GetStates_Response)(nil), // 141: tfplugin6.GetStates.Response + (*DeleteState_Request)(nil), // 142: tfplugin6.DeleteState.Request + (*DeleteState_Response)(nil), // 143: tfplugin6.DeleteState.Response + (*PlanAction_Request)(nil), // 144: tfplugin6.PlanAction.Request + (*PlanAction_Response)(nil), // 145: tfplugin6.PlanAction.Response + (*InvokeAction_Request)(nil), // 146: tfplugin6.InvokeAction.Request + (*InvokeAction_Event)(nil), // 147: tfplugin6.InvokeAction.Event + (*InvokeAction_Event_Progress)(nil), // 148: tfplugin6.InvokeAction.Event.Progress + (*InvokeAction_Event_Completed)(nil), // 149: tfplugin6.InvokeAction.Event.Completed + (*ValidateActionConfig_Request)(nil), // 150: tfplugin6.ValidateActionConfig.Request + (*ValidateActionConfig_Response)(nil), // 151: tfplugin6.ValidateActionConfig.Response + (*timestamppb.Timestamp)(nil), // 152: google.protobuf.Timestamp } var file_tfplugin6_proto_depIdxs = []int32{ 1, // 0: tfplugin6.Diagnostic.severity:type_name -> tfplugin6.Diagnostic.Severity 8, // 1: tfplugin6.Diagnostic.attribute:type_name -> tfplugin6.AttributePath - 50, // 2: tfplugin6.AttributePath.steps:type_name -> tfplugin6.AttributePath.Step - 53, // 3: tfplugin6.RawState.flatmap:type_name -> tfplugin6.RawState.FlatmapEntry - 54, // 4: tfplugin6.ResourceIdentitySchema.identity_attributes:type_name -> tfplugin6.ResourceIdentitySchema.IdentityAttribute + 56, // 2: tfplugin6.AttributePath.steps:type_name -> tfplugin6.AttributePath.Step + 59, // 3: tfplugin6.RawState.flatmap:type_name -> tfplugin6.RawState.FlatmapEntry + 60, // 4: tfplugin6.ResourceIdentitySchema.identity_attributes:type_name -> tfplugin6.ResourceIdentitySchema.IdentityAttribute 5, // 5: tfplugin6.ResourceIdentityData.identity_data:type_name -> tfplugin6.DynamicValue 14, // 6: tfplugin6.ActionSchema.schema:type_name -> tfplugin6.Schema - 55, // 7: tfplugin6.Schema.block:type_name -> tfplugin6.Schema.Block - 59, // 8: tfplugin6.Function.parameters:type_name -> tfplugin6.Function.Parameter - 59, // 9: tfplugin6.Function.variadic_parameter:type_name -> tfplugin6.Function.Parameter - 60, // 10: tfplugin6.Function.return:type_name -> tfplugin6.Function.Return + 61, // 7: tfplugin6.Schema.block:type_name -> tfplugin6.Schema.Block + 65, // 8: tfplugin6.Function.parameters:type_name -> tfplugin6.Function.Parameter + 65, // 9: tfplugin6.Function.variadic_parameter:type_name -> tfplugin6.Function.Parameter + 66, // 10: tfplugin6.Function.return:type_name -> tfplugin6.Function.Return 0, // 11: tfplugin6.Function.description_kind:type_name -> tfplugin6.StringKind 4, // 12: tfplugin6.Deferred.reason:type_name -> tfplugin6.Deferred.Reason - 56, // 13: tfplugin6.Schema.Block.attributes:type_name -> tfplugin6.Schema.Attribute - 57, // 14: tfplugin6.Schema.Block.block_types:type_name -> tfplugin6.Schema.NestedBlock + 62, // 13: tfplugin6.Schema.Block.attributes:type_name -> tfplugin6.Schema.Attribute + 63, // 14: tfplugin6.Schema.Block.block_types:type_name -> tfplugin6.Schema.NestedBlock 0, // 15: tfplugin6.Schema.Block.description_kind:type_name -> tfplugin6.StringKind - 58, // 16: tfplugin6.Schema.Attribute.nested_type:type_name -> tfplugin6.Schema.Object + 64, // 16: tfplugin6.Schema.Attribute.nested_type:type_name -> tfplugin6.Schema.Object 0, // 17: tfplugin6.Schema.Attribute.description_kind:type_name -> tfplugin6.StringKind - 55, // 18: tfplugin6.Schema.NestedBlock.block:type_name -> tfplugin6.Schema.Block + 61, // 18: tfplugin6.Schema.NestedBlock.block:type_name -> tfplugin6.Schema.Block 2, // 19: tfplugin6.Schema.NestedBlock.nesting:type_name -> tfplugin6.Schema.NestedBlock.NestingMode - 56, // 20: tfplugin6.Schema.Object.attributes:type_name -> tfplugin6.Schema.Attribute + 62, // 20: tfplugin6.Schema.Object.attributes:type_name -> tfplugin6.Schema.Attribute 3, // 21: tfplugin6.Schema.Object.nesting:type_name -> tfplugin6.Schema.Object.NestingMode 0, // 22: tfplugin6.Function.Parameter.description_kind:type_name -> tfplugin6.StringKind 16, // 23: tfplugin6.GetMetadata.Response.server_capabilities:type_name -> tfplugin6.ServerCapabilities 6, // 24: tfplugin6.GetMetadata.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 65, // 25: tfplugin6.GetMetadata.Response.data_sources:type_name -> tfplugin6.GetMetadata.DataSourceMetadata - 66, // 26: tfplugin6.GetMetadata.Response.resources:type_name -> tfplugin6.GetMetadata.ResourceMetadata - 64, // 27: tfplugin6.GetMetadata.Response.functions:type_name -> tfplugin6.GetMetadata.FunctionMetadata - 63, // 28: tfplugin6.GetMetadata.Response.ephemeral_resources:type_name -> tfplugin6.GetMetadata.EphemeralMetadata - 67, // 29: tfplugin6.GetMetadata.Response.list_resources:type_name -> tfplugin6.GetMetadata.ListResourceMetadata - 68, // 30: tfplugin6.GetMetadata.Response.state_stores:type_name -> tfplugin6.GetMetadata.StateStoreMetadata - 69, // 31: tfplugin6.GetMetadata.Response.actions:type_name -> tfplugin6.GetMetadata.ActionMetadata + 71, // 25: tfplugin6.GetMetadata.Response.data_sources:type_name -> tfplugin6.GetMetadata.DataSourceMetadata + 72, // 26: tfplugin6.GetMetadata.Response.resources:type_name -> tfplugin6.GetMetadata.ResourceMetadata + 70, // 27: tfplugin6.GetMetadata.Response.functions:type_name -> tfplugin6.GetMetadata.FunctionMetadata + 69, // 28: tfplugin6.GetMetadata.Response.ephemeral_resources:type_name -> tfplugin6.GetMetadata.EphemeralMetadata + 73, // 29: tfplugin6.GetMetadata.Response.list_resources:type_name -> tfplugin6.GetMetadata.ListResourceMetadata + 74, // 30: tfplugin6.GetMetadata.Response.state_stores:type_name -> tfplugin6.GetMetadata.StateStoreMetadata + 75, // 31: tfplugin6.GetMetadata.Response.actions:type_name -> tfplugin6.GetMetadata.ActionMetadata 14, // 32: tfplugin6.GetProviderSchema.Response.provider:type_name -> tfplugin6.Schema - 72, // 33: tfplugin6.GetProviderSchema.Response.resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry - 73, // 34: tfplugin6.GetProviderSchema.Response.data_source_schemas:type_name -> tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry - 74, // 35: tfplugin6.GetProviderSchema.Response.functions:type_name -> tfplugin6.GetProviderSchema.Response.FunctionsEntry - 75, // 36: tfplugin6.GetProviderSchema.Response.ephemeral_resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.EphemeralResourceSchemasEntry - 76, // 37: tfplugin6.GetProviderSchema.Response.list_resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ListResourceSchemasEntry - 77, // 38: tfplugin6.GetProviderSchema.Response.state_store_schemas:type_name -> tfplugin6.GetProviderSchema.Response.StateStoreSchemasEntry - 78, // 39: tfplugin6.GetProviderSchema.Response.action_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ActionSchemasEntry + 78, // 33: tfplugin6.GetProviderSchema.Response.resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ResourceSchemasEntry + 79, // 34: tfplugin6.GetProviderSchema.Response.data_source_schemas:type_name -> tfplugin6.GetProviderSchema.Response.DataSourceSchemasEntry + 80, // 35: tfplugin6.GetProviderSchema.Response.functions:type_name -> tfplugin6.GetProviderSchema.Response.FunctionsEntry + 81, // 36: tfplugin6.GetProviderSchema.Response.ephemeral_resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.EphemeralResourceSchemasEntry + 82, // 37: tfplugin6.GetProviderSchema.Response.list_resource_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ListResourceSchemasEntry + 83, // 38: tfplugin6.GetProviderSchema.Response.state_store_schemas:type_name -> tfplugin6.GetProviderSchema.Response.StateStoreSchemasEntry + 84, // 39: tfplugin6.GetProviderSchema.Response.action_schemas:type_name -> tfplugin6.GetProviderSchema.Response.ActionSchemasEntry 6, // 40: tfplugin6.GetProviderSchema.Response.diagnostics:type_name -> tfplugin6.Diagnostic 14, // 41: tfplugin6.GetProviderSchema.Response.provider_meta:type_name -> tfplugin6.Schema 16, // 42: tfplugin6.GetProviderSchema.Response.server_capabilities:type_name -> tfplugin6.ServerCapabilities @@ -8003,7 +8561,7 @@ var file_tfplugin6_proto_depIdxs = []int32{ 10, // 52: tfplugin6.UpgradeResourceState.Request.raw_state:type_name -> tfplugin6.RawState 5, // 53: tfplugin6.UpgradeResourceState.Response.upgraded_state:type_name -> tfplugin6.DynamicValue 6, // 54: tfplugin6.UpgradeResourceState.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 85, // 55: tfplugin6.GetResourceIdentitySchemas.Response.identity_schemas:type_name -> tfplugin6.GetResourceIdentitySchemas.Response.IdentitySchemasEntry + 91, // 55: tfplugin6.GetResourceIdentitySchemas.Response.identity_schemas:type_name -> tfplugin6.GetResourceIdentitySchemas.Response.IdentitySchemasEntry 6, // 56: tfplugin6.GetResourceIdentitySchemas.Response.diagnostics:type_name -> tfplugin6.Diagnostic 11, // 57: tfplugin6.GetResourceIdentitySchemas.Response.IdentitySchemasEntry.value:type_name -> tfplugin6.ResourceIdentitySchema 10, // 58: tfplugin6.UpgradeResourceIdentity.Request.raw_identity:type_name -> tfplugin6.RawState @@ -8050,7 +8608,7 @@ var file_tfplugin6_proto_depIdxs = []int32{ 12, // 99: tfplugin6.ImportResourceState.Request.identity:type_name -> tfplugin6.ResourceIdentityData 5, // 100: tfplugin6.ImportResourceState.ImportedResource.state:type_name -> tfplugin6.DynamicValue 12, // 101: tfplugin6.ImportResourceState.ImportedResource.identity:type_name -> tfplugin6.ResourceIdentityData - 103, // 102: tfplugin6.ImportResourceState.Response.imported_resources:type_name -> tfplugin6.ImportResourceState.ImportedResource + 109, // 102: tfplugin6.ImportResourceState.Response.imported_resources:type_name -> tfplugin6.ImportResourceState.ImportedResource 6, // 103: tfplugin6.ImportResourceState.Response.diagnostics:type_name -> tfplugin6.Diagnostic 18, // 104: tfplugin6.ImportResourceState.Response.deferred:type_name -> tfplugin6.Deferred 5, // 105: tfplugin6.GenerateResourceConfig.Request.state:type_name -> tfplugin6.DynamicValue @@ -8070,13 +8628,13 @@ var file_tfplugin6_proto_depIdxs = []int32{ 5, // 119: tfplugin6.OpenEphemeralResource.Request.config:type_name -> tfplugin6.DynamicValue 17, // 120: tfplugin6.OpenEphemeralResource.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities 6, // 121: tfplugin6.OpenEphemeralResource.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 142, // 122: tfplugin6.OpenEphemeralResource.Response.renew_at:type_name -> google.protobuf.Timestamp + 152, // 122: tfplugin6.OpenEphemeralResource.Response.renew_at:type_name -> google.protobuf.Timestamp 5, // 123: tfplugin6.OpenEphemeralResource.Response.result:type_name -> tfplugin6.DynamicValue 18, // 124: tfplugin6.OpenEphemeralResource.Response.deferred:type_name -> tfplugin6.Deferred 6, // 125: tfplugin6.RenewEphemeralResource.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 142, // 126: tfplugin6.RenewEphemeralResource.Response.renew_at:type_name -> google.protobuf.Timestamp + 152, // 126: tfplugin6.RenewEphemeralResource.Response.renew_at:type_name -> google.protobuf.Timestamp 6, // 127: tfplugin6.CloseEphemeralResource.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 119, // 128: tfplugin6.GetFunctions.Response.functions:type_name -> tfplugin6.GetFunctions.Response.FunctionsEntry + 125, // 128: tfplugin6.GetFunctions.Response.functions:type_name -> tfplugin6.GetFunctions.Response.FunctionsEntry 6, // 129: tfplugin6.GetFunctions.Response.diagnostics:type_name -> tfplugin6.Diagnostic 15, // 130: tfplugin6.GetFunctions.Response.FunctionsEntry.value:type_name -> tfplugin6.Function 5, // 131: tfplugin6.CallFunction.Request.arguments:type_name -> tfplugin6.DynamicValue @@ -8093,89 +8651,100 @@ var file_tfplugin6_proto_depIdxs = []int32{ 5, // 142: tfplugin6.ValidateStateStore.Request.config:type_name -> tfplugin6.DynamicValue 6, // 143: tfplugin6.ValidateStateStore.Response.diagnostics:type_name -> tfplugin6.Diagnostic 5, // 144: tfplugin6.ConfigureStateStore.Request.config:type_name -> tfplugin6.DynamicValue - 6, // 145: tfplugin6.ConfigureStateStore.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 6, // 146: tfplugin6.GetStates.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 6, // 147: tfplugin6.DeleteState.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 5, // 148: tfplugin6.PlanAction.Request.config:type_name -> tfplugin6.DynamicValue - 17, // 149: tfplugin6.PlanAction.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities - 6, // 150: tfplugin6.PlanAction.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 18, // 151: tfplugin6.PlanAction.Response.deferred:type_name -> tfplugin6.Deferred - 5, // 152: tfplugin6.InvokeAction.Request.config:type_name -> tfplugin6.DynamicValue - 17, // 153: tfplugin6.InvokeAction.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities - 138, // 154: tfplugin6.InvokeAction.Event.progress:type_name -> tfplugin6.InvokeAction.Event.Progress - 139, // 155: tfplugin6.InvokeAction.Event.completed:type_name -> tfplugin6.InvokeAction.Event.Completed - 6, // 156: tfplugin6.InvokeAction.Event.Completed.diagnostics:type_name -> tfplugin6.Diagnostic - 5, // 157: tfplugin6.ValidateActionConfig.Request.config:type_name -> tfplugin6.DynamicValue - 6, // 158: tfplugin6.ValidateActionConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic - 61, // 159: tfplugin6.Provider.GetMetadata:input_type -> tfplugin6.GetMetadata.Request - 70, // 160: tfplugin6.Provider.GetProviderSchema:input_type -> tfplugin6.GetProviderSchema.Request - 79, // 161: tfplugin6.Provider.ValidateProviderConfig:input_type -> tfplugin6.ValidateProviderConfig.Request - 88, // 162: tfplugin6.Provider.ValidateResourceConfig:input_type -> tfplugin6.ValidateResourceConfig.Request - 90, // 163: tfplugin6.Provider.ValidateDataResourceConfig:input_type -> tfplugin6.ValidateDataResourceConfig.Request - 81, // 164: tfplugin6.Provider.UpgradeResourceState:input_type -> tfplugin6.UpgradeResourceState.Request - 83, // 165: tfplugin6.Provider.GetResourceIdentitySchemas:input_type -> tfplugin6.GetResourceIdentitySchemas.Request - 86, // 166: tfplugin6.Provider.UpgradeResourceIdentity:input_type -> tfplugin6.UpgradeResourceIdentity.Request - 94, // 167: tfplugin6.Provider.ConfigureProvider:input_type -> tfplugin6.ConfigureProvider.Request - 96, // 168: tfplugin6.Provider.ReadResource:input_type -> tfplugin6.ReadResource.Request - 98, // 169: tfplugin6.Provider.PlanResourceChange:input_type -> tfplugin6.PlanResourceChange.Request - 100, // 170: tfplugin6.Provider.ApplyResourceChange:input_type -> tfplugin6.ApplyResourceChange.Request - 102, // 171: tfplugin6.Provider.ImportResourceState:input_type -> tfplugin6.ImportResourceState.Request - 107, // 172: tfplugin6.Provider.MoveResourceState:input_type -> tfplugin6.MoveResourceState.Request - 109, // 173: tfplugin6.Provider.ReadDataSource:input_type -> tfplugin6.ReadDataSource.Request - 105, // 174: tfplugin6.Provider.GenerateResourceConfig:input_type -> tfplugin6.GenerateResourceConfig.Request - 92, // 175: tfplugin6.Provider.ValidateEphemeralResourceConfig:input_type -> tfplugin6.ValidateEphemeralResourceConfig.Request - 111, // 176: tfplugin6.Provider.OpenEphemeralResource:input_type -> tfplugin6.OpenEphemeralResource.Request - 113, // 177: tfplugin6.Provider.RenewEphemeralResource:input_type -> tfplugin6.RenewEphemeralResource.Request - 115, // 178: tfplugin6.Provider.CloseEphemeralResource:input_type -> tfplugin6.CloseEphemeralResource.Request - 122, // 179: tfplugin6.Provider.ListResource:input_type -> tfplugin6.ListResource.Request - 124, // 180: tfplugin6.Provider.ValidateListResourceConfig:input_type -> tfplugin6.ValidateListResourceConfig.Request - 117, // 181: tfplugin6.Provider.GetFunctions:input_type -> tfplugin6.GetFunctions.Request - 120, // 182: tfplugin6.Provider.CallFunction:input_type -> tfplugin6.CallFunction.Request - 126, // 183: tfplugin6.Provider.ValidateStateStoreConfig:input_type -> tfplugin6.ValidateStateStore.Request - 128, // 184: tfplugin6.Provider.ConfigureStateStore:input_type -> tfplugin6.ConfigureStateStore.Request - 130, // 185: tfplugin6.Provider.GetStates:input_type -> tfplugin6.GetStates.Request - 132, // 186: tfplugin6.Provider.DeleteState:input_type -> tfplugin6.DeleteState.Request - 134, // 187: tfplugin6.Provider.PlanAction:input_type -> tfplugin6.PlanAction.Request - 136, // 188: tfplugin6.Provider.InvokeAction:input_type -> tfplugin6.InvokeAction.Request - 140, // 189: tfplugin6.Provider.ValidateActionConfig:input_type -> tfplugin6.ValidateActionConfig.Request - 51, // 190: tfplugin6.Provider.StopProvider:input_type -> tfplugin6.StopProvider.Request - 62, // 191: tfplugin6.Provider.GetMetadata:output_type -> tfplugin6.GetMetadata.Response - 71, // 192: tfplugin6.Provider.GetProviderSchema:output_type -> tfplugin6.GetProviderSchema.Response - 80, // 193: tfplugin6.Provider.ValidateProviderConfig:output_type -> tfplugin6.ValidateProviderConfig.Response - 89, // 194: tfplugin6.Provider.ValidateResourceConfig:output_type -> tfplugin6.ValidateResourceConfig.Response - 91, // 195: tfplugin6.Provider.ValidateDataResourceConfig:output_type -> tfplugin6.ValidateDataResourceConfig.Response - 82, // 196: tfplugin6.Provider.UpgradeResourceState:output_type -> tfplugin6.UpgradeResourceState.Response - 84, // 197: tfplugin6.Provider.GetResourceIdentitySchemas:output_type -> tfplugin6.GetResourceIdentitySchemas.Response - 87, // 198: tfplugin6.Provider.UpgradeResourceIdentity:output_type -> tfplugin6.UpgradeResourceIdentity.Response - 95, // 199: tfplugin6.Provider.ConfigureProvider:output_type -> tfplugin6.ConfigureProvider.Response - 97, // 200: tfplugin6.Provider.ReadResource:output_type -> tfplugin6.ReadResource.Response - 99, // 201: tfplugin6.Provider.PlanResourceChange:output_type -> tfplugin6.PlanResourceChange.Response - 101, // 202: tfplugin6.Provider.ApplyResourceChange:output_type -> tfplugin6.ApplyResourceChange.Response - 104, // 203: tfplugin6.Provider.ImportResourceState:output_type -> tfplugin6.ImportResourceState.Response - 108, // 204: tfplugin6.Provider.MoveResourceState:output_type -> tfplugin6.MoveResourceState.Response - 110, // 205: tfplugin6.Provider.ReadDataSource:output_type -> tfplugin6.ReadDataSource.Response - 106, // 206: tfplugin6.Provider.GenerateResourceConfig:output_type -> tfplugin6.GenerateResourceConfig.Response - 93, // 207: tfplugin6.Provider.ValidateEphemeralResourceConfig:output_type -> tfplugin6.ValidateEphemeralResourceConfig.Response - 112, // 208: tfplugin6.Provider.OpenEphemeralResource:output_type -> tfplugin6.OpenEphemeralResource.Response - 114, // 209: tfplugin6.Provider.RenewEphemeralResource:output_type -> tfplugin6.RenewEphemeralResource.Response - 116, // 210: tfplugin6.Provider.CloseEphemeralResource:output_type -> tfplugin6.CloseEphemeralResource.Response - 123, // 211: tfplugin6.Provider.ListResource:output_type -> tfplugin6.ListResource.Event - 125, // 212: tfplugin6.Provider.ValidateListResourceConfig:output_type -> tfplugin6.ValidateListResourceConfig.Response - 118, // 213: tfplugin6.Provider.GetFunctions:output_type -> tfplugin6.GetFunctions.Response - 121, // 214: tfplugin6.Provider.CallFunction:output_type -> tfplugin6.CallFunction.Response - 127, // 215: tfplugin6.Provider.ValidateStateStoreConfig:output_type -> tfplugin6.ValidateStateStore.Response - 129, // 216: tfplugin6.Provider.ConfigureStateStore:output_type -> tfplugin6.ConfigureStateStore.Response - 131, // 217: tfplugin6.Provider.GetStates:output_type -> tfplugin6.GetStates.Response - 133, // 218: tfplugin6.Provider.DeleteState:output_type -> tfplugin6.DeleteState.Response - 135, // 219: tfplugin6.Provider.PlanAction:output_type -> tfplugin6.PlanAction.Response - 137, // 220: tfplugin6.Provider.InvokeAction:output_type -> tfplugin6.InvokeAction.Event - 141, // 221: tfplugin6.Provider.ValidateActionConfig:output_type -> tfplugin6.ValidateActionConfig.Response - 52, // 222: tfplugin6.Provider.StopProvider:output_type -> tfplugin6.StopProvider.Response - 191, // [191:223] is the sub-list for method output_type - 159, // [159:191] is the sub-list for method input_type - 159, // [159:159] is the sub-list for extension type_name - 159, // [159:159] is the sub-list for extension extendee - 0, // [0:159] is the sub-list for field type_name + 45, // 145: tfplugin6.ConfigureStateStore.Request.capabilities:type_name -> tfplugin6.StateStoreClientCapabilities + 6, // 146: tfplugin6.ConfigureStateStore.Response.diagnostics:type_name -> tfplugin6.Diagnostic + 46, // 147: tfplugin6.ConfigureStateStore.Response.capabilities:type_name -> tfplugin6.StateStoreServerCapabilities + 50, // 148: tfplugin6.ReadStateBytes.Response.range:type_name -> tfplugin6.StateRange + 6, // 149: tfplugin6.ReadStateBytes.Response.diagnostics:type_name -> tfplugin6.Diagnostic + 49, // 150: tfplugin6.WriteStateBytes.RequestChunk.meta:type_name -> tfplugin6.RequestChunkMeta + 50, // 151: tfplugin6.WriteStateBytes.RequestChunk.range:type_name -> tfplugin6.StateRange + 6, // 152: tfplugin6.WriteStateBytes.Response.diagnostics:type_name -> tfplugin6.Diagnostic + 6, // 153: tfplugin6.GetStates.Response.diagnostics:type_name -> tfplugin6.Diagnostic + 6, // 154: tfplugin6.DeleteState.Response.diagnostics:type_name -> tfplugin6.Diagnostic + 5, // 155: tfplugin6.PlanAction.Request.config:type_name -> tfplugin6.DynamicValue + 17, // 156: tfplugin6.PlanAction.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities + 6, // 157: tfplugin6.PlanAction.Response.diagnostics:type_name -> tfplugin6.Diagnostic + 18, // 158: tfplugin6.PlanAction.Response.deferred:type_name -> tfplugin6.Deferred + 5, // 159: tfplugin6.InvokeAction.Request.config:type_name -> tfplugin6.DynamicValue + 17, // 160: tfplugin6.InvokeAction.Request.client_capabilities:type_name -> tfplugin6.ClientCapabilities + 148, // 161: tfplugin6.InvokeAction.Event.progress:type_name -> tfplugin6.InvokeAction.Event.Progress + 149, // 162: tfplugin6.InvokeAction.Event.completed:type_name -> tfplugin6.InvokeAction.Event.Completed + 6, // 163: tfplugin6.InvokeAction.Event.Completed.diagnostics:type_name -> tfplugin6.Diagnostic + 5, // 164: tfplugin6.ValidateActionConfig.Request.config:type_name -> tfplugin6.DynamicValue + 6, // 165: tfplugin6.ValidateActionConfig.Response.diagnostics:type_name -> tfplugin6.Diagnostic + 67, // 166: tfplugin6.Provider.GetMetadata:input_type -> tfplugin6.GetMetadata.Request + 76, // 167: tfplugin6.Provider.GetProviderSchema:input_type -> tfplugin6.GetProviderSchema.Request + 85, // 168: tfplugin6.Provider.ValidateProviderConfig:input_type -> tfplugin6.ValidateProviderConfig.Request + 94, // 169: tfplugin6.Provider.ValidateResourceConfig:input_type -> tfplugin6.ValidateResourceConfig.Request + 96, // 170: tfplugin6.Provider.ValidateDataResourceConfig:input_type -> tfplugin6.ValidateDataResourceConfig.Request + 87, // 171: tfplugin6.Provider.UpgradeResourceState:input_type -> tfplugin6.UpgradeResourceState.Request + 89, // 172: tfplugin6.Provider.GetResourceIdentitySchemas:input_type -> tfplugin6.GetResourceIdentitySchemas.Request + 92, // 173: tfplugin6.Provider.UpgradeResourceIdentity:input_type -> tfplugin6.UpgradeResourceIdentity.Request + 100, // 174: tfplugin6.Provider.ConfigureProvider:input_type -> tfplugin6.ConfigureProvider.Request + 102, // 175: tfplugin6.Provider.ReadResource:input_type -> tfplugin6.ReadResource.Request + 104, // 176: tfplugin6.Provider.PlanResourceChange:input_type -> tfplugin6.PlanResourceChange.Request + 106, // 177: tfplugin6.Provider.ApplyResourceChange:input_type -> tfplugin6.ApplyResourceChange.Request + 108, // 178: tfplugin6.Provider.ImportResourceState:input_type -> tfplugin6.ImportResourceState.Request + 113, // 179: tfplugin6.Provider.MoveResourceState:input_type -> tfplugin6.MoveResourceState.Request + 115, // 180: tfplugin6.Provider.ReadDataSource:input_type -> tfplugin6.ReadDataSource.Request + 111, // 181: tfplugin6.Provider.GenerateResourceConfig:input_type -> tfplugin6.GenerateResourceConfig.Request + 98, // 182: tfplugin6.Provider.ValidateEphemeralResourceConfig:input_type -> tfplugin6.ValidateEphemeralResourceConfig.Request + 117, // 183: tfplugin6.Provider.OpenEphemeralResource:input_type -> tfplugin6.OpenEphemeralResource.Request + 119, // 184: tfplugin6.Provider.RenewEphemeralResource:input_type -> tfplugin6.RenewEphemeralResource.Request + 121, // 185: tfplugin6.Provider.CloseEphemeralResource:input_type -> tfplugin6.CloseEphemeralResource.Request + 128, // 186: tfplugin6.Provider.ListResource:input_type -> tfplugin6.ListResource.Request + 130, // 187: tfplugin6.Provider.ValidateListResourceConfig:input_type -> tfplugin6.ValidateListResourceConfig.Request + 123, // 188: tfplugin6.Provider.GetFunctions:input_type -> tfplugin6.GetFunctions.Request + 126, // 189: tfplugin6.Provider.CallFunction:input_type -> tfplugin6.CallFunction.Request + 132, // 190: tfplugin6.Provider.ValidateStateStoreConfig:input_type -> tfplugin6.ValidateStateStore.Request + 134, // 191: tfplugin6.Provider.ConfigureStateStore:input_type -> tfplugin6.ConfigureStateStore.Request + 136, // 192: tfplugin6.Provider.ReadStateBytes:input_type -> tfplugin6.ReadStateBytes.Request + 138, // 193: tfplugin6.Provider.WriteStateBytes:input_type -> tfplugin6.WriteStateBytes.RequestChunk + 140, // 194: tfplugin6.Provider.GetStates:input_type -> tfplugin6.GetStates.Request + 142, // 195: tfplugin6.Provider.DeleteState:input_type -> tfplugin6.DeleteState.Request + 144, // 196: tfplugin6.Provider.PlanAction:input_type -> tfplugin6.PlanAction.Request + 146, // 197: tfplugin6.Provider.InvokeAction:input_type -> tfplugin6.InvokeAction.Request + 150, // 198: tfplugin6.Provider.ValidateActionConfig:input_type -> tfplugin6.ValidateActionConfig.Request + 57, // 199: tfplugin6.Provider.StopProvider:input_type -> tfplugin6.StopProvider.Request + 68, // 200: tfplugin6.Provider.GetMetadata:output_type -> tfplugin6.GetMetadata.Response + 77, // 201: tfplugin6.Provider.GetProviderSchema:output_type -> tfplugin6.GetProviderSchema.Response + 86, // 202: tfplugin6.Provider.ValidateProviderConfig:output_type -> tfplugin6.ValidateProviderConfig.Response + 95, // 203: tfplugin6.Provider.ValidateResourceConfig:output_type -> tfplugin6.ValidateResourceConfig.Response + 97, // 204: tfplugin6.Provider.ValidateDataResourceConfig:output_type -> tfplugin6.ValidateDataResourceConfig.Response + 88, // 205: tfplugin6.Provider.UpgradeResourceState:output_type -> tfplugin6.UpgradeResourceState.Response + 90, // 206: tfplugin6.Provider.GetResourceIdentitySchemas:output_type -> tfplugin6.GetResourceIdentitySchemas.Response + 93, // 207: tfplugin6.Provider.UpgradeResourceIdentity:output_type -> tfplugin6.UpgradeResourceIdentity.Response + 101, // 208: tfplugin6.Provider.ConfigureProvider:output_type -> tfplugin6.ConfigureProvider.Response + 103, // 209: tfplugin6.Provider.ReadResource:output_type -> tfplugin6.ReadResource.Response + 105, // 210: tfplugin6.Provider.PlanResourceChange:output_type -> tfplugin6.PlanResourceChange.Response + 107, // 211: tfplugin6.Provider.ApplyResourceChange:output_type -> tfplugin6.ApplyResourceChange.Response + 110, // 212: tfplugin6.Provider.ImportResourceState:output_type -> tfplugin6.ImportResourceState.Response + 114, // 213: tfplugin6.Provider.MoveResourceState:output_type -> tfplugin6.MoveResourceState.Response + 116, // 214: tfplugin6.Provider.ReadDataSource:output_type -> tfplugin6.ReadDataSource.Response + 112, // 215: tfplugin6.Provider.GenerateResourceConfig:output_type -> tfplugin6.GenerateResourceConfig.Response + 99, // 216: tfplugin6.Provider.ValidateEphemeralResourceConfig:output_type -> tfplugin6.ValidateEphemeralResourceConfig.Response + 118, // 217: tfplugin6.Provider.OpenEphemeralResource:output_type -> tfplugin6.OpenEphemeralResource.Response + 120, // 218: tfplugin6.Provider.RenewEphemeralResource:output_type -> tfplugin6.RenewEphemeralResource.Response + 122, // 219: tfplugin6.Provider.CloseEphemeralResource:output_type -> tfplugin6.CloseEphemeralResource.Response + 129, // 220: tfplugin6.Provider.ListResource:output_type -> tfplugin6.ListResource.Event + 131, // 221: tfplugin6.Provider.ValidateListResourceConfig:output_type -> tfplugin6.ValidateListResourceConfig.Response + 124, // 222: tfplugin6.Provider.GetFunctions:output_type -> tfplugin6.GetFunctions.Response + 127, // 223: tfplugin6.Provider.CallFunction:output_type -> tfplugin6.CallFunction.Response + 133, // 224: tfplugin6.Provider.ValidateStateStoreConfig:output_type -> tfplugin6.ValidateStateStore.Response + 135, // 225: tfplugin6.Provider.ConfigureStateStore:output_type -> tfplugin6.ConfigureStateStore.Response + 137, // 226: tfplugin6.Provider.ReadStateBytes:output_type -> tfplugin6.ReadStateBytes.Response + 139, // 227: tfplugin6.Provider.WriteStateBytes:output_type -> tfplugin6.WriteStateBytes.Response + 141, // 228: tfplugin6.Provider.GetStates:output_type -> tfplugin6.GetStates.Response + 143, // 229: tfplugin6.Provider.DeleteState:output_type -> tfplugin6.DeleteState.Response + 145, // 230: tfplugin6.Provider.PlanAction:output_type -> tfplugin6.PlanAction.Response + 147, // 231: tfplugin6.Provider.InvokeAction:output_type -> tfplugin6.InvokeAction.Event + 151, // 232: tfplugin6.Provider.ValidateActionConfig:output_type -> tfplugin6.ValidateActionConfig.Response + 58, // 233: tfplugin6.Provider.StopProvider:output_type -> tfplugin6.StopProvider.Response + 200, // [200:234] is the sub-list for method output_type + 166, // [166:200] is the sub-list for method input_type + 166, // [166:166] is the sub-list for extension type_name + 166, // [166:166] is the sub-list for extension extendee + 0, // [0:166] is the sub-list for field type_name } func init() { file_tfplugin6_proto_init() } @@ -8184,17 +8753,18 @@ func file_tfplugin6_proto_init() { return } file_tfplugin6_proto_msgTypes[2].OneofWrappers = []any{} - file_tfplugin6_proto_msgTypes[45].OneofWrappers = []any{ + file_tfplugin6_proto_msgTypes[51].OneofWrappers = []any{ (*AttributePath_Step_AttributeName)(nil), (*AttributePath_Step_ElementKeyString)(nil), (*AttributePath_Step_ElementKeyInt)(nil), } - file_tfplugin6_proto_msgTypes[107].OneofWrappers = []any{} - file_tfplugin6_proto_msgTypes[108].OneofWrappers = []any{} - file_tfplugin6_proto_msgTypes[109].OneofWrappers = []any{} - file_tfplugin6_proto_msgTypes[110].OneofWrappers = []any{} - file_tfplugin6_proto_msgTypes[118].OneofWrappers = []any{} - file_tfplugin6_proto_msgTypes[132].OneofWrappers = []any{ + file_tfplugin6_proto_msgTypes[113].OneofWrappers = []any{} + file_tfplugin6_proto_msgTypes[114].OneofWrappers = []any{} + file_tfplugin6_proto_msgTypes[115].OneofWrappers = []any{} + file_tfplugin6_proto_msgTypes[116].OneofWrappers = []any{} + file_tfplugin6_proto_msgTypes[124].OneofWrappers = []any{} + file_tfplugin6_proto_msgTypes[133].OneofWrappers = []any{} + file_tfplugin6_proto_msgTypes[142].OneofWrappers = []any{ (*InvokeAction_Event_Progress_)(nil), (*InvokeAction_Event_Completed_)(nil), } @@ -8204,7 +8774,7 @@ func file_tfplugin6_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_tfplugin6_proto_rawDesc), len(file_tfplugin6_proto_rawDesc)), NumEnums: 5, - NumMessages: 137, + NumMessages: 147, NumExtensions: 0, NumServices: 1, }, @@ -8275,6 +8845,10 @@ type ProviderClient interface { ValidateStateStoreConfig(ctx context.Context, in *ValidateStateStore_Request, opts ...grpc.CallOption) (*ValidateStateStore_Response, error) // ConfigureStateStore configures the state store, such as S3 connection in the context of already configured provider ConfigureStateStore(ctx context.Context, in *ConfigureStateStore_Request, opts ...grpc.CallOption) (*ConfigureStateStore_Response, error) + // ReadStateBytes streams byte chunks of a given state file from a state store + ReadStateBytes(ctx context.Context, in *ReadStateBytes_Request, opts ...grpc.CallOption) (Provider_ReadStateBytesClient, error) + // WriteStateBytes streams byte chunks of a given state file into a state store + WriteStateBytes(ctx context.Context, opts ...grpc.CallOption) (Provider_WriteStateBytesClient, error) // GetStates returns a list of all states (i.e. CE workspaces) managed by a given state store GetStates(ctx context.Context, in *GetStates_Request, opts ...grpc.CallOption) (*GetStates_Response, error) // DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace) @@ -8552,6 +9126,72 @@ func (c *providerClient) ConfigureStateStore(ctx context.Context, in *ConfigureS return out, nil } +func (c *providerClient) ReadStateBytes(ctx context.Context, in *ReadStateBytes_Request, opts ...grpc.CallOption) (Provider_ReadStateBytesClient, error) { + stream, err := c.cc.NewStream(ctx, &_Provider_serviceDesc.Streams[1], "/tfplugin6.Provider/ReadStateBytes", opts...) + if err != nil { + return nil, err + } + x := &providerReadStateBytesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Provider_ReadStateBytesClient interface { + Recv() (*ReadStateBytes_Response, error) + grpc.ClientStream +} + +type providerReadStateBytesClient struct { + grpc.ClientStream +} + +func (x *providerReadStateBytesClient) Recv() (*ReadStateBytes_Response, error) { + m := new(ReadStateBytes_Response) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *providerClient) WriteStateBytes(ctx context.Context, opts ...grpc.CallOption) (Provider_WriteStateBytesClient, error) { + stream, err := c.cc.NewStream(ctx, &_Provider_serviceDesc.Streams[2], "/tfplugin6.Provider/WriteStateBytes", opts...) + if err != nil { + return nil, err + } + x := &providerWriteStateBytesClient{stream} + return x, nil +} + +type Provider_WriteStateBytesClient interface { + Send(*WriteStateBytes_RequestChunk) error + CloseAndRecv() (*WriteStateBytes_Response, error) + grpc.ClientStream +} + +type providerWriteStateBytesClient struct { + grpc.ClientStream +} + +func (x *providerWriteStateBytesClient) Send(m *WriteStateBytes_RequestChunk) error { + return x.ClientStream.SendMsg(m) +} + +func (x *providerWriteStateBytesClient) CloseAndRecv() (*WriteStateBytes_Response, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(WriteStateBytes_Response) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func (c *providerClient) GetStates(ctx context.Context, in *GetStates_Request, opts ...grpc.CallOption) (*GetStates_Response, error) { out := new(GetStates_Response) err := c.cc.Invoke(ctx, "/tfplugin6.Provider/GetStates", in, out, opts...) @@ -8580,7 +9220,7 @@ func (c *providerClient) PlanAction(ctx context.Context, in *PlanAction_Request, } func (c *providerClient) InvokeAction(ctx context.Context, in *InvokeAction_Request, opts ...grpc.CallOption) (Provider_InvokeActionClient, error) { - stream, err := c.cc.NewStream(ctx, &_Provider_serviceDesc.Streams[1], "/tfplugin6.Provider/InvokeAction", opts...) + stream, err := c.cc.NewStream(ctx, &_Provider_serviceDesc.Streams[3], "/tfplugin6.Provider/InvokeAction", opts...) if err != nil { return nil, err } @@ -8676,6 +9316,10 @@ type ProviderServer interface { ValidateStateStoreConfig(context.Context, *ValidateStateStore_Request) (*ValidateStateStore_Response, error) // ConfigureStateStore configures the state store, such as S3 connection in the context of already configured provider ConfigureStateStore(context.Context, *ConfigureStateStore_Request) (*ConfigureStateStore_Response, error) + // ReadStateBytes streams byte chunks of a given state file from a state store + ReadStateBytes(*ReadStateBytes_Request, Provider_ReadStateBytesServer) error + // WriteStateBytes streams byte chunks of a given state file into a state store + WriteStateBytes(Provider_WriteStateBytesServer) error // GetStates returns a list of all states (i.e. CE workspaces) managed by a given state store GetStates(context.Context, *GetStates_Request) (*GetStates_Response, error) // DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace) @@ -8770,6 +9414,12 @@ func (*UnimplementedProviderServer) ValidateStateStoreConfig(context.Context, *V func (*UnimplementedProviderServer) ConfigureStateStore(context.Context, *ConfigureStateStore_Request) (*ConfigureStateStore_Response, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfigureStateStore not implemented") } +func (*UnimplementedProviderServer) ReadStateBytes(*ReadStateBytes_Request, Provider_ReadStateBytesServer) error { + return status.Errorf(codes.Unimplemented, "method ReadStateBytes not implemented") +} +func (*UnimplementedProviderServer) WriteStateBytes(Provider_WriteStateBytesServer) error { + return status.Errorf(codes.Unimplemented, "method WriteStateBytes not implemented") +} func (*UnimplementedProviderServer) GetStates(context.Context, *GetStates_Request) (*GetStates_Response, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStates not implemented") } @@ -9264,6 +9914,53 @@ func _Provider_ConfigureStateStore_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Provider_ReadStateBytes_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(ReadStateBytes_Request) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(ProviderServer).ReadStateBytes(m, &providerReadStateBytesServer{stream}) +} + +type Provider_ReadStateBytesServer interface { + Send(*ReadStateBytes_Response) error + grpc.ServerStream +} + +type providerReadStateBytesServer struct { + grpc.ServerStream +} + +func (x *providerReadStateBytesServer) Send(m *ReadStateBytes_Response) error { + return x.ServerStream.SendMsg(m) +} + +func _Provider_WriteStateBytes_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ProviderServer).WriteStateBytes(&providerWriteStateBytesServer{stream}) +} + +type Provider_WriteStateBytesServer interface { + SendAndClose(*WriteStateBytes_Response) error + Recv() (*WriteStateBytes_RequestChunk, error) + grpc.ServerStream +} + +type providerWriteStateBytesServer struct { + grpc.ServerStream +} + +func (x *providerWriteStateBytesServer) SendAndClose(m *WriteStateBytes_Response) error { + return x.ServerStream.SendMsg(m) +} + +func (x *providerWriteStateBytesServer) Recv() (*WriteStateBytes_RequestChunk, error) { + m := new(WriteStateBytes_RequestChunk) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + func _Provider_GetStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetStates_Request) if err := dec(in); err != nil { @@ -9506,6 +10203,16 @@ var _Provider_serviceDesc = grpc.ServiceDesc{ Handler: _Provider_ListResource_Handler, ServerStreams: true, }, + { + StreamName: "ReadStateBytes", + Handler: _Provider_ReadStateBytes_Handler, + ServerStreams: true, + }, + { + StreamName: "WriteStateBytes", + Handler: _Provider_WriteStateBytes_Handler, + ClientStreams: true, + }, { StreamName: "InvokeAction", Handler: _Provider_InvokeAction_Handler,