Hi @Anonymous
Have you tried using the -force parameter? like?
Remove-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -Force
Best Regards
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have a public ip resource that I can't delete in azure, getting following errros:
CoreServicesVnetGateway-IP2: Public IP address /resourceGroups/ContosoResourceGroup/providers/Microsoft.Network/publicIPAddresses/CoreServicesVnetGateway-IP2 can not be deleted since it is still allocated to resource resourceGroups/ContosoResourceGroup/providers/Microsoft.Network/virtualNetworkGateways/CoreServicesVnetGateway/ipConfigurations/default. In order to delete the public IP, disassociate/detach the Public IP address from the resource. To learn how to do this, see aka.ms/deletepublicip. (Code: PublicIPAddressCannotBeDeleted)
However, the associated resource is already deleted and if I try to navigate to it I get a 404 error, there is no way for me to delete it myself.
I have spoken to the support chat and tried the usual Powershell cmds to remove the Vnet Gateway and Public IP via this method but neither of these work.
Please help, thanks.
Hi @Anonymous
Have you tried using the -force parameter? like?
Remove-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -Force
Best Regards
Microsoft support ended up removing the Public IP resource manually on the backend.
Hi
Regards,
Mohammed Altamash
--please don't forget to upvote and Accept as answer if the reply is helpful--
I have tried the -Force flag but to no avail unfortunately.
@Mohammed Altamash Mohammed Suleman Khan I can't disassociate the Public IP from the VNet Gateway as the VNet Gateway has already been deleted. I have also tried to delete the whole resource group within Azure and on Powershell but it won't delete still.
I believe support are going to esculate this as it sounds like an issue with the backend.
Thanks
Hi @Anonymous
That is interesting and unexpected although there can be a slim delay but it should not be hours.
Could you try to connect to Azure using powershell, switch to the correct subscription and paste the value under the "IpConfiguration" on the resource. You need to use the AZ module for this
Connect az-account
Select-AzSubscription -Subscription ("subscription ID where the PIP is located")
Get-AzPublicIpAddress -Name "CoreServicesVnetGateway-IP2"
It should show you the following properties.
Name
ResourceGroupName
Location
Id
Etag
ProvisioningState
Tags
PublicIpAllocationMethod
IpAddress
PublicIpAddressVersion
IdleTimeoutInMinutes
IpConfiguration
DnsSettings
Zones
Sku
IpTags
ExtendedLocation
What value does it show under the IpConfiguration attribute? Is it empty, or does it show the ID of the virtual network gateway that you have deleted?