update grpc_provider for new diffs
Keep the diff as-is before applying.
This commit is contained in:
parent
f78b5045d0
commit
8d302c5bd2
|
@ -513,16 +513,6 @@ func (s *GRPCProviderServer) PlanResourceChange(_ context.Context, req *proto.Pl
|
||||||
return resp, nil
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if diff != nil {
|
|
||||||
// strip out non-diffs
|
|
||||||
for k, v := range diff.Attributes {
|
|
||||||
if v.New == v.Old && !v.NewComputed {
|
|
||||||
delete(diff.Attributes, k)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if diff == nil || len(diff.Attributes) == 0 {
|
if diff == nil || len(diff.Attributes) == 0 {
|
||||||
// schema.Provider.Diff returns nil if it ends up making a diff with no
|
// 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
|
// changes, but our new interface wants us to return an actual change
|
||||||
|
@ -950,6 +940,8 @@ func normalizeFlatmapContainers(prior map[string]string, attrs map[string]string
|
||||||
// schema.
|
// schema.
|
||||||
if isCount(k) && v == "1" {
|
if isCount(k) && v == "1" {
|
||||||
ones[k] = true
|
ones[k] = true
|
||||||
|
// make sure we don't have the same key under both categories.
|
||||||
|
delete(zeros, k)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue