Skip to content

Commit

Permalink
Merge pull request crossplane#318 from ulucinar/fix-diff-state
Browse files Browse the repository at this point in the history
Set diff state's Attributes to nil if the resource does not exist
  • Loading branch information
ulucinar authored Dec 25, 2023
2 parents 1d547af + ccb0611 commit 81e2620
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controller/external_nofork.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ func (n *noForkExternal) Observe(ctx context.Context, mg xpresource.Managed) (ma
stateValueMap = jsonMap
newState.RawPlan = stateValue
diffState = newState
} else if diffState != nil {
diffState.Attributes = nil
}
instanceDiff, err := n.getResourceDataDiff(mg.(resource.Terraformed), ctx, diffState, resourceExists)
if err != nil {
Expand Down

0 comments on commit 81e2620

Please sign in to comment.