Skip to content

Commit 657d7e4

Browse files
radeksimkoSarahFrench
authored andcommitted
Implement ReadStateBytes + WriteStateBytes
1 parent e4db96b commit 657d7e4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

internal/providers/provider.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,34 @@ type WriteStateBytesResponse struct {
903903
Diagnostics tfdiags.Diagnostics
904904
}
905905

906+
type ReadStateBytesRequest struct {
907+
// TypeName is the name of the state store to read state from
908+
TypeName string
909+
// StateId is the ID of a state file to read
910+
StateId string
911+
}
912+
913+
type ReadStateBytesResponse struct {
914+
// Bytes represents all received bytes of the given state file
915+
Bytes []byte
916+
// Diagnostics contains any warnings or errors from the method call.
917+
Diagnostics tfdiags.Diagnostics
918+
}
919+
920+
type WriteStateBytesRequest struct {
921+
// TypeName is the name of the state store to write state to
922+
TypeName string
923+
// Bytes represents all bytes of the given state file to write
924+
Bytes []byte
925+
// StateId is the ID of a state file to write
926+
StateId string
927+
}
928+
929+
type WriteStateBytesResponse struct {
930+
// Diagnostics contains any warnings or errors from the method call.
931+
Diagnostics tfdiags.Diagnostics
932+
}
933+
906934
type GetStatesRequest struct {
907935
// TypeName is the name of the state store to request the list of states from
908936
TypeName string

0 commit comments

Comments
 (0)