Skip to content

Commit

Permalink
Merge pull request #334 from erhancagirici/fix-diffstate-when-empty
Browse files Browse the repository at this point in the history
fix diff state not being set to freshly observed state for non-existing resources
  • Loading branch information
ulucinar authored Jan 31, 2024
2 parents af203bd + 510b6e0 commit 0e52e5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/external_nofork.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ func (n *noForkExternal) Observe(ctx context.Context, mg xpresource.Managed) (ma
if diag != nil && diag.HasError() {
return managed.ExternalObservation{}, errors.Errorf("failed to observe the resource: %v", diag)
}
diffState := n.opTracker.GetTfState()
n.opTracker.SetTfState(newState) // TODO: missing RawConfig & RawPlan here...
diffState := n.opTracker.GetTfState()
resourceExists := newState != nil && newState.ID != ""

var stateValueMap map[string]any
Expand Down

0 comments on commit 0e52e5d

Please sign in to comment.