Set status to deleting even when external resource does not exist
Updates the status of managed resource to be set to deleting in the case where an external resource does not exist, but we fail to unpublish connection or remove finalizer. Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
This commit is contained in:
parent
426347c178
commit
cf89dda36b
|
|
@ -627,9 +627,9 @@ func (r *Reconciler) Reconcile(_ context.Context, req reconcile.Request) (reconc
|
|||
|
||||
if meta.WasDeleted(managed) {
|
||||
log = log.WithValues("deletion-timestamp", managed.GetDeletionTimestamp())
|
||||
managed.SetConditions(xpv1.Deleting())
|
||||
|
||||
if observation.ResourceExists && managed.GetDeletionPolicy() != xpv1.DeletionOrphan {
|
||||
managed.SetConditions(xpv1.Deleting())
|
||||
if err := external.Delete(externalCtx, managed); err != nil {
|
||||
// We'll hit this condition if we can't delete our external
|
||||
// resource, for example if our provider credentials don't have
|
||||
|
|
|
|||
Loading…
Reference in New Issue