diff --git a/helper/plugin/grpc_provider.go b/helper/plugin/grpc_provider.go index 136336e45..7669cb628 100644 --- a/helper/plugin/grpc_provider.go +++ b/helper/plugin/grpc_provider.go @@ -476,11 +476,16 @@ func (s *GRPCProviderServer) PlanResourceChange(_ context.Context, req *proto.Pl } if diff == nil { - // schema.Provider.Diff returns nil if it ends up making a diff with - // no changes, but our new interface wants us to return an actual - // change description that _shows_ there are no changes, so we return - // the proposed change that produces no diff. - resp.PlannedState = req.ProposedNewState + // schema.Provider.Diff returns nil if it ends up making a diff with no + // changes, but our new interface wants us to return an actual change + // description that _shows_ there are no changes. This is usually the + // PriorSate, however if there was no prior state and no diff, then we + // use the ProposedNewState. + if !priorStateVal.IsNull() { + resp.PlannedState = req.PriorState + } else { + resp.PlannedState = req.ProposedNewState + } return resp, nil }