Cannot delete private endpoint connection

Frank van Graafeiland 21 Reputation points
2020-10-13T13:44:35.547+00:00

Hi guys,

I've created a private endpoint for a recovery services vault and now I want to delete both of these resources, but I'm not able to. First I tried to delete the two resource groups that these resources are in, but this failed.

When I try to delete the recovery services vault, I get an error message saying I need to delete all private endpoints associated with this vault first. However, the private endpoint connection doesn't show up under private endpoint connections in the Azure portal.

When I try to delete the private endpoint itself (which has a provisioning state of Failed), I just get the "An error occured" message without any further explanation.

When I try to delete the Network Interface that is created for the private endpoint connection on the private subnet, I get the message that it cannot be deleted because it is in use with a private endpoint.

Lastly, the subnet cannot be deleted because the Network Interface is still attached to it.

Does anyone have experience with this issue or does anyone know what I haven't tried yet?

Thanks in advance.

Frank

Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
470 questions
{count} votes

Accepted answer
  1. GitaraniSharma-MSFT 47,696 Reputation points Microsoft Employee
    2020-10-13T16:06:41+00:00

    Hello @Frank van Graafeiland ,

    Welcome to Microsoft Q&A Platform. Thanks for posting your query.

    There is a known issue with Private Endpoints which is preventing them from being deleted and below is the RCA from the backend team:

    Symptom : Delete Private Endpoint call is failing.
    Cause : A recent code change introduced a regression which is leading to the inability in deleting private endpoints. We sincerely apologize for the inconvenience caused.
    Workaround : No immediate workaround, we are working on deploying the fix.

    Backend team is working was on a fix but looks like you have the same issue. I would request you to give the below a try:
    Perform "Get-AzPrivateEndpoint", store the output in a variable, and then perform "Set-AzPrivateEndpoint".

    Get-AzPrivateEndpoint : https://learn.microsoft.com/en-us/powershell/module/Az.Network/Get-AzPrivateEndpoint?view=azps-4.7.0
    Set-AzPrivateEndpoint : https://learn.microsoft.com/en-us/powershell/module/az.network/set-azprivateendpoint?view=azps-4.7.0

    And post this check if the Private endpoint provisioning comes back to "Succeeded" state.

    If it does, try to delete the Private endpoint first and then Virtual Network and finally Resource group.

    If it does not goes back to "Succeeded" state and remains in failed state, you would need to raise a support case. Hence, if you have a support plan, I request you to file a support ticket, else please do let us know, we will try and help you get a one-time free technical support. In this case, do send an email to azcommunity@microsoft.com referencing this thread as well as your subscription ID. Please mention "ATTN gishar" in the subject field.

    Hope this helps!

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


2 additional answers

Sort by: Most helpful
  1. Dhamapurkar, Pranotee 1 Reputation point
    2020-12-26T22:51:12.643+00:00

    Hi team,
    Please help to resolve below error.
    all resources are deleted -still getting same error.
    Vault cannot be deleted as there are existing resources within the vault. : vm01,LAPTOP-S30N73R4.
    Please ensure all containers have been unregistered from the vault and all private endpoints associated with the vault have been deleted, and retry operation. For more details, see https://aka.ms/AB-AA4ecq5 (Code: ServiceResourceNotEmptyWithBackendMessage)
    See less

    0 comments No comments

  2. Gaurav Kumar Sharma 1 Reputation point
    2021-03-14T06:58:21.517+00:00

    Try to remove the entries from private dns zones first and then delete endpoints..

    0 comments No comments