diff --git a/templates/pkg/resource/manager.go.tpl b/templates/pkg/resource/manager.go.tpl index 181b3c65..347c72bd 100644 --- a/templates/pkg/resource/manager.go.tpl +++ b/templates/pkg/resource/manager.go.tpl @@ -74,6 +74,9 @@ func (rm *resourceManager) ReadOne( } observed, err := rm.sdkFind(ctx, r) if err != nil { + if observed != nil { + return rm.onError(observed, err) + } return rm.onError(r, err) } return rm.onSuccess(observed)