Skip to content

Commit

Permalink
Merge pull request #324 from sergenyalcin/fix-nil-instance-diff
Browse files Browse the repository at this point in the history
Add a nil check for the calculated instanceDiff while Observe
  • Loading branch information
sergenyalcin authored Jan 9, 2024
2 parents b20afd6 + 58b94f0 commit fb3a200
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/external_nofork.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,9 @@ func (n *noForkExternal) Observe(ctx context.Context, mg xpresource.Managed) (ma
if err != nil {
return managed.ExternalObservation{}, errors.Wrap(err, "cannot compute the instance diff")
}
if instanceDiff == nil {
instanceDiff = tf.NewInstanceDiff()
}
n.instanceDiff = instanceDiff
noDiff := instanceDiff.Empty()

Expand Down

0 comments on commit fb3a200

Please sign in to comment.