Cannot delete a Public IP that has no resources associated with

Qian Zhuge 20 Reputation points Microsoft Employee
2024-07-03T08:13:35.46+00:00

I was trying to delete the Public IP address 'IP-TestARM', which is not associated to any resources. But the operation failed and the error shows:

'Failed to delete public IP address 'IP-TestARM'. Error: Public IP address /subscriptions/{hideSubsId}/resourceGroups/TestARM/providers/Microsoft.Network/publicIPAddresses/IP-TestARM can not be deleted since it is still allocated to a cloud service. In order to delete the public IP address, delete the associated cloud service and then retry the operation.'

But I cannot identify which resource is this IP associated to. I tried to run the following command in PowerShell:

Get-AzPublicIpAddress -ResourceGroupName "TestARM" -Name "IP-TestARM-Staging" | Select-Object -Property *

The result shows that IpConfigurationText is null and IpConfiguration is empty, providing no useful information.

Can anyone guide me on how to delete this Public IP address?

I'm not sure which resource this IP was previously associated with. I need to identify the resource and ensure it has been successfully deleted. How can I access the logs to verify this?

User's image

User's image

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,450 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
441 questions
0 comments No comments
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 45,366 Reputation points Microsoft Employee
    2024-07-04T13:50:38.5966667+00:00

    @Qian Zhuge ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    Did you try to delete the Public IP using Powershell command?

    Are you getting the same error ?

    Cheers,

    Kapil

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Manu Philip 18,561 Reputation points MVP
    2024-07-03T14:38:19.1833333+00:00

    Hi,

    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

    User's image

    User's image

    0 comments No comments

Your answer

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