helper/plugin: don't panic in PlanResourceChange PlannedState

This commit is contained in:
Martin Atkins 2018-08-27 13:43:35 -07:00
parent ec11efc50a
commit 686018ae12
1 changed files with 3 additions and 1 deletions

View File

@ -398,7 +398,9 @@ func (s *GRPCProviderServer) PlanResourceChange(_ context.Context, req *proto.Pl
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
return resp, nil
}
resp.PlannedState.Msgpack = plannedMP
resp.PlannedState = &proto.DynamicValue{
Msgpack: plannedMP,
}
// the Meta field gets encoded into PlannedPrivate
plannedPrivate, err := json.Marshal(diff.Meta)