Unable to delete public ip resource

Qi-Jian-Huang-DevOps 166 Reputation points
2021-07-12T19:06:22.37+00:00

HI,

I have a public ip resource got stuck in azure, getting following errros:

Failed to delete public IP address 'pip-agw-prod0-001'. Error: Public IP address rg-dms-prod0/providers/Microsoft.Network/publicIPAddresses/pip-agw-prod0-001'>pip-agw-prod0-001 can not be deleted since it is still allocated to resource Microsoft.Network/loadBalancers/appgwLoadBalancer/frontendIPConfigurations/appGwPublicFrontendIp001. In order to delete the public IP, disassociate/detach the Public IP address from the resource.

However, the associated resource is already deleted, there is no way for me to delete it myself.

Please help, thanks.

Azure DevTest Labs
Azure DevTest Labs
An Azure service that is used for provisioning development and test environments.
254 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Manu Philip 16,961 Reputation points MVP
    2021-07-12T19:16:56.29+00:00

    In Azure Portal->Dashboard->All Resources-> Check 'show hidden types' and make sure that no filters are applied. Check, if there are some resources as reported in the error message while deleting the PIP. Delete those, if listed there and try deleting the PIP again

    1 person found this answer helpful.

  2. Manu Philip 16,961 Reputation points MVP
    2021-07-12T19:48:09.457+00:00

    Looks like a permission issue. To perform the deletion, you need to be at least a network contributor on the subscription level or on the needed resource level.


  3. Manu Philip 16,961 Reputation points MVP
    2021-07-12T19:57:38.927+00:00

    Have you tried from PS?
    Remove-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName