Skip to content

Commit 60cb773

Browse files
committed
Update Read/WriteStateBytes RPCs to match hashicorp/terraform-plugin-go#531
1 parent bd2039e commit 60cb773

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/plugin-protocol/tfplugin6.proto

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ service Provider {
426426
rpc ConfigureStateStore(ConfigureStateStore.Request) returns (ConfigureStateStore.Response);
427427

428428
// ReadStateBytes streams byte chunks of a given state file from a state store
429-
rpc ReadStateBytes(ReadStateBytes.Request) returns (stream ReadStateBytes.ResponseChunk);
429+
rpc ReadStateBytes(ReadStateBytes.Request) returns (stream ReadStateBytes.Response);
430430
// WriteStateBytes streams byte chunks of a given state file into a state store
431431
rpc WriteStateBytes(stream WriteStateBytes.RequestChunk) returns (WriteStateBytes.Response);
432432

@@ -923,7 +923,6 @@ message ValidateListResourceConfig {
923923
}
924924
}
925925

926-
927926
message ValidateStateStore {
928927
message Request {
929928
string type_name = 1;
@@ -949,7 +948,7 @@ message ReadStateBytes {
949948
string type_name = 1;
950949
string state_id = 2;
951950
}
952-
message ResponseChunk {
951+
message Response {
953952
bytes bytes = 1;
954953
int64 total_length = 2;
955954
StateRange range = 3;
@@ -959,9 +958,11 @@ message ReadStateBytes {
959958

960959
message WriteStateBytes {
961960
message RequestChunk {
961+
// TODO: Can we decouple this outside of the stream?
962962
string type_name = 1;
963-
bytes bytes = 2;
964963
string state_id = 3;
964+
965+
bytes bytes = 2;
965966
int64 total_length = 4;
966967
StateRange range = 5;
967968
}

0 commit comments

Comments
 (0)