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 22, 2023
1 parent 1d547af commit 343f24c
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 {
diffState.Attributes = nil
}
instanceDiff, err := n.getResourceDataDiff(mg.(resource.Terraformed), ctx, diffState, resourceExists)
if err != nil {
Expand Down

0 comments on commit 343f24c

Please sign in to comment.