question

jianhuang avatar image
0 Votes"
jianhuang asked HuangJian-6824 commented

Unable to delete public ip resource

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-devtestlabs
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can you please check the below URL. You will have to modify by adding the Subscription and Resource Group in the below URL

https://ms.portal.azure.com/#@microsoft.onmicrosoft.com/resource/subscriptions/<SUBSCRIPTION>/resourceGroups/<RESOURCEGROUP>/providers/Microsoft.Network/loadBalancers/appgwLoadBalancer/frontendIpPool

Pls check whether you can Find an IP address named appGwPublicFrontendIp001 - this is the dependency that preventing you from deleting the Public IP.

You can try deleting this and try deleting the Public IP

0 Votes 0 ·

Hi Jianhuang,

Can you try re-create the resource(exact same name and same resource group) and associate it with the Public IP? Then you can delete the resource first and delete the Public IP.

Hope this might be helpful.

Best Regards,
Wenjian Xu

0 Votes 0 ·
HuangJian-6824 avatar image HuangJian-6824 WenjianXuShanghaiWicresoftCoLtd-5747 ·

hi Wenjian Xu,

I had contacted microsoft support, the the support engineer was able to delete the public ip for me in the back end. Thank you.

Jian

0 Votes 0 ·
ManuPhilip avatar image
0 Votes"
ManuPhilip answered jianhuang commented

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi ManuPhilip,

I have checked the 'show hidden types', there is nothing else except the public ip resource.

Also within the public ip resource, i saw the 'associated to : appgwLoadBalancer' resource which was the public ip depend on, when i click on that resource, it gives me 'no access' error

Details:
You do not have authorization to access this resource.

Resource ID: /subscriptions/876dbede-81d6-41ef-9b1c-9f16945a93f4/resourceGroups/armrg-99dfa039-75a4-4dc6-a5de-b309585ebc03/providers/Microsoft.Network/loadBalancers/appgwLoadBalancer

Thanks.

0 Votes 0 ·
ManuPhilip avatar image
0 Votes"
ManuPhilip answered jianhuang commented

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.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am the global admin for this subscription.

0 Votes 0 ·
ManuPhilip avatar image
0 Votes"
ManuPhilip answered jianhuang commented

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

· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just tried using powershell, exact same error as trying to delete it from azure portal.

0 Votes 0 ·

To disassociate the public IP from the Load Balancer, you need to delete the IP configuration in the Load Balancer front end. Have a look at the following reference to disassociate the IP from frontend
remove-azloadbalancerfrontendipconfig


0 Votes 0 ·

There is none of resources left, load balancer/IP configuration all being deleted, just this public ip resource left, most likely I will need Azure cloud engineer to help me delete for me, will see what happends.

Thanks for helping.

0 Votes 0 ·
Show more comments