Skip to content

Commit

Permalink
fix diff state not being set to freshly observed state for non-existi…
Browse files Browse the repository at this point in the history
…ng resources

Signed-off-by: Erhan Cagirici <[email protected]>
  • Loading branch information
erhancagirici committed Jan 24, 2024
1 parent 87fae5e commit 510b6e0
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 @@ -474,8 +474,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 510b6e0

Please sign in to comment.