Skip to content

Commit

Permalink
Set diff state's Attributes to nil if the resource does not exist
Browse files Browse the repository at this point in the history
Signed-off-by: Alper Rifat Ulucinar <[email protected]>
  • Loading branch information
ulucinar committed Dec 25, 2023
1 parent 1d547af commit ccb0611
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 ccb0611

Please sign in to comment.