cannot delete a resource group

Ivanchyk, Vasyl 1 Reputation point
2022-04-11T18:48:23.207+00:00

Hello All

Please help as I am kept billed.
I cannot delete a resource group.
(A few days ago I deleted ssh keys on my local machine and decided to delete a resource group because I lost an access to it. Some VMs were running.)

When pressing the delete button to remove the resource group, the system is keeping deleting for a while and then through an error.
When I am trying to delete instances inside the resource group the errors are been kept arising.
Instances types:

  • Network security group -- when deleting, a pop-up says "cannot delete network security group. network security group cannot be deleted when in use by subnet or network interface"
  • Public IP address -- when deleting, error arises
    "Failed to delete public IP address 'edgePublicIP'. Error: Public IP address edgePublicIP can not be deleted since it is still allocated to resource /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/AZURE_LAB1/providers/Microsoft.Network/networkInterfaces/edgeVMNic/ipConfigurations/ipconfigedge. 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."
  • Virtual network -- when deleting,
    "Failed to delete virtual network 'AZURE_LAB1_vnet'. Error: Subnet EMEA_AZURE_LAB1_adm_subnet is in use by /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/AZURE_LAB1/providers/Microsoft.Network/networkInterfaces/edgeVMNic/ipConfigurations/ipconfigedge and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet."
    -- when dissociating -- nothing happens.

All Network interfaces are already deleted.
Subnets on instances are deleted, except of 2 subsets on 1 instance, which has no option to get deleted.

Also tried CLI commands -- did not work.

Has anybody encountered similar problem?

Azure Resource Mover
Azure Resource Mover
An Azure service used for moving multiple resources between Azure regions.
218 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 39,461 Reputation points
    2022-04-15T05:27:36.837+00:00

    Hello @Ivanchyk, Vasyl

    Since this issue involves both a technical issue and a billing issue, it would be recommended to get in touch with Azure Support in order to fix both in sequence, thus resolving the situation.

    You can find the access to Azure Support here:
    https://support.microsoft.com/en-us/topic/contact-microsoft-azure-support-2315e669-8b1f-493b-5fb1-d88a8736ffe4

    Hope this helps with your query,

    --------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

  2. Monalla-MSFT 12,601 Reputation points
    2022-04-19T02:11:19.85+00:00

    Hello @Ivanchyk, Vasyl - Welcome to Microsoft Q&A and thanks for reaching out.

    If the Network Interface still shows up in your Resource Group, you can check the Network Security Group it was attached to 'main_vmNSG' and review the 'Network Interfaces' tab. If there are any Interfaces in here, you'll need to Dissociate them.

    If you don't see that it has an Association with any Network Interface, then you can force Update the Network Interface with Azure CLI, PowerShell, or through Resources.Azure.com

    Using Azure Cloud Shell:

    CLI Update Network Interface: https://learn.microsoft.com/en-us/cli/azure/network/nic?view=azure-cli-latest

    CLI Update Network Security Group: https://learn.microsoft.com/en-us/cli/azure/network/nsg?view=azure-cli-latest#az_network_nsg_update

    Using Resources.Azure.com, you'll need to find the Network Interface through Subscriptions > (Subscription Name) > resourceGroups > (ResourceGroup Name) > providers > Microsoft.Network > networkInterfaces > (Interface Name)
    Edit then PUT to force the resource to update with Azure if it's stuck in a deletion or updating state.

    Hope this helps. and please feel free to reach out if you have any further questions.

    ------------------------------------------------------------------

    If the above response was helpful, please feel free to "Accept as Answer" and "Upvote" the same so it can be beneficial to the community.

    0 comments No comments