From 6f54bfaa7c8598adaf02b13c7765b5702d49c8cf Mon Sep 17 00:00:00 2001 From: James Bardin Date: Fri, 4 Jan 2019 13:47:04 -0500 Subject: [PATCH] send config during apply --- plugin/grpc_provider.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugin/grpc_provider.go b/plugin/grpc_provider.go index 6bab719c8..373e07394 100644 --- a/plugin/grpc_provider.go +++ b/plugin/grpc_provider.go @@ -420,11 +420,17 @@ func (p *GRPCProvider) ApplyResourceChange(r providers.ApplyResourceChangeReques resp.Diagnostics = resp.Diagnostics.Append(err) return resp } + configMP, err := msgpack.Marshal(r.Config, resSchema.Block.ImpliedType()) + if err != nil { + resp.Diagnostics = resp.Diagnostics.Append(err) + return resp + } protoReq := &proto.ApplyResourceChange_Request{ TypeName: r.TypeName, PriorState: &proto.DynamicValue{Msgpack: priorMP}, PlannedState: &proto.DynamicValue{Msgpack: plannedMP}, + Config: &proto.DynamicValue{Msgpack: configMP}, PlannedPrivate: r.PlannedPrivate, }