From d93b462e9cf66cd52a708d439e421c5388bad29e Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 2 Oct 2018 21:22:03 +0100 Subject: [PATCH] helper/plugin: don't panic in ReadDataSource State --- helper/plugin/grpc_provider.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helper/plugin/grpc_provider.go b/helper/plugin/grpc_provider.go index b02a7dd86..c266793d5 100644 --- a/helper/plugin/grpc_provider.go +++ b/helper/plugin/grpc_provider.go @@ -619,7 +619,9 @@ func (s *GRPCProviderServer) ReadDataSource(_ context.Context, req *proto.ReadDa resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err) return resp, nil } - resp.State.Msgpack = newStateMP + resp.State = &proto.DynamicValue{ + Msgpack: newStateMP, + } return resp, nil }