Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions provider/pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1428,6 +1428,13 @@ func (k *azureNativeProvider) Delete(ctx context.Context, req *rpc.DeleteRequest
return nil, azure.AzureError(err)
}
}

// Check if we timed out and the resource still exists. If so, return an error.
// This is a best-effort check, as the resource may have been deleted after the timeout.
if err := ctx.Err(); err != nil && errors.Is(err, context.DeadlineExceeded) {
return nil, fmt.Errorf("timed out waiting for resource %q to be deleted", id)
}

return &pbempty.Empty{}, nil
}

Expand Down