split PriorStateRaw into JSON and Flatmap
This way the provider doesn't need to be concerned with determining the state encoding.
This commit is contained in:
parent
91b5bbbde0
commit
6a1b57a1e4
|
@ -130,11 +130,14 @@ type UpgradeResourceStateRequest struct {
|
|||
// Version is version of the schema that created the current state.
|
||||
Version int
|
||||
|
||||
// PriorStateRaw is the state that needs to be upgraded to match the current
|
||||
// schema version. Because the schema is unknown, this contains only the
|
||||
// raw bytes as stored in the state. It is up to the provider to interpret
|
||||
// the payload and return a state encoded with the current schema.
|
||||
PriorStateRaw []byte
|
||||
// RawStateJSON and RawStateFlatmap contiain the state that needs to be
|
||||
// upgraded to match the current schema version. Because the schema is
|
||||
// unknown, this contains only the raw data as stored in the state.
|
||||
// RawStateJSON is the current json state encoding.
|
||||
// RawStateFlatmap is the legacy flatmap encoding.
|
||||
// Only on of these fields may be set for the upgrade request.
|
||||
RawStateJSON []byte
|
||||
RawStateFlatmap map[string]string
|
||||
}
|
||||
|
||||
type UpgradeResourceStateResponse struct {
|
||||
|
|
Loading…
Reference in New Issue