Unable to delete public ip address. It's associated to a non existing vpngwLoadBalancer resource

Torsten Egebirk 30 Reputation points
2025-09-22T10:45:52.02+00:00

Hi

Im unable to delete a public ip address. Before deleting it, I should remove any associations.

It's currently associated to a "vpngwLoadBalancer" resource which doesn't exist or I don't have access to.

Can anyone help me on how to proceed.

I have tried different approaches inclusive:

Get-AzResourceGroup | Where-Object {$_.ResourceGroupName  -Like "name_of_the_resourcegroup_where_troubled_public_ip_is_located*"} | Remove-AzResourceGroup -force -AsJob
Azure VPN Gateway
Azure VPN Gateway
An Azure service that enables the connection of on-premises networks to Azure through site-to-site virtual private networks.
{count} vote

Answer accepted by question author
  1. Thanmayi Godithi 1,635 Reputation points Microsoft External Staff Moderator
    2025-09-22T13:05:47.6633333+00:00

    Hi @Torsten Egebirk,

    Thank you for reaching out on Microsoft Q&A forum.

    The reason you can’t delete this Public IP is because Azure still thinks it’s linked to a hidden resource called vpngwLoadBalancer. This is something Azure creates in the background when you use a VPN Gateway. Even if you’ve already deleted the VPN Gateway, sometimes the link doesn’t get cleaned up properly.

    1. Run the following to check what the Public IP is linked to:
         az network public-ip show -g <RG> -n <PublicIpName> --query "ipConfiguration.id"
      
      Refer: Azure CLI Commands
    2. If it shows an ipConfiguration.id tied to a Load Balancer. Go to that Load Balancer and remove the frontend IP config (or delete the LB if not needed).
    3. Then delete the Public IP:
         az network public-ip delete -g <RG> -n <PublicIpName>
      
    4. If no ipConfiguration appears but the delete still fails → please let us know, and we’ll raise a support ticket so Microsoft can clean it up from the backend.
    5. For that we need few details, could you please share the below details via "private message" option.User's image
    • Email ID:
    • Time zone:
    • Subscription ID:
    • Tenand ID:

    Thanks

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.