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:
hasheddan 2021-03-28 11:35:18 -05:00
parent 426347c178
commit cf89dda36b
No known key found for this signature in database
GPG Key ID: BD68BC686A14C271
1 changed files with 1 additions and 1 deletions

View File

@ -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