send config during apply
This commit is contained in:
parent
3ce68d61a3
commit
6f54bfaa7c
|
@ -420,11 +420,17 @@ func (p *GRPCProvider) ApplyResourceChange(r providers.ApplyResourceChangeReques
|
||||||
resp.Diagnostics = resp.Diagnostics.Append(err)
|
resp.Diagnostics = resp.Diagnostics.Append(err)
|
||||||
return resp
|
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{
|
protoReq := &proto.ApplyResourceChange_Request{
|
||||||
TypeName: r.TypeName,
|
TypeName: r.TypeName,
|
||||||
PriorState: &proto.DynamicValue{Msgpack: priorMP},
|
PriorState: &proto.DynamicValue{Msgpack: priorMP},
|
||||||
PlannedState: &proto.DynamicValue{Msgpack: plannedMP},
|
PlannedState: &proto.DynamicValue{Msgpack: plannedMP},
|
||||||
|
Config: &proto.DynamicValue{Msgpack: configMP},
|
||||||
PlannedPrivate: r.PlannedPrivate,
|
PlannedPrivate: r.PlannedPrivate,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue