Unable to delete Azure Resource Group - InternalServerError returned no other useful messages

Jez 0 Reputation points
2024-06-15T23:25:01.8666667+00:00

I have a resource group that I'm trying to delete that contains a vnet, route table and network security group

It's been over 8 hours since I attempted to delete the group and/or the resources within it individually

The only error I'm getting back is the one below

(InternalServerError) An error occurred. Code: InternalServerError Message: An error occurred.

When I view the RG in resources.azure.com the 'provisioningState' says it's "Deleting", but it's been doing that for hours.

{

"id": "/subscriptions/c8f89bad-8852-4f33-8b44-f7898cd0f898/resourceGroups/rg-myproject-prod",

"name": "rg-myproject-prod",

"location": "australiaeast",

"properties": {

"provisioningState": "Deleting"

}

}

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,236 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Babafemi Bulugbe 2,680 Reputation points MVP
    2024-06-17T06:53:39.22+00:00

    Hello Jez,

    Thank you for posting your query in the Microsoft Q&A Community.

    There are a few things to check if are still experiencing this issue. The very first is to check for dependencies. Ensure there are no resources associated with the Subs within the Vnet that might prevent its deletion. You can determine what resource is using your subnet by doing an API call using the below

    GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}}?api-version=2020-07-01
    

    If no resource is found associated, check for the existence of VNet pairing on your VNet. If there is an active one, then this might be the cause.

    If the issue persists, consider raising a support ticket with Azure support for further assistance.

    Let me know if further assistance is needed.

    Babafemi

    0 comments No comments

  2. GitaraniSharma-MSFT 48,521 Reputation points Microsoft Employee
    2024-06-18T01:35:54.8933333+00:00

    Hello @Jez ,

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

    I understand that you have an Azure resource group containing a Vnet, route table, and network security group, and you are attempting to delete it. However, the process is failing with an "InternalServerError."

    To delete a resource group, you need access to the delete action for the Microsoft.Resources/subscriptions/resourceGroups resource.

    Additionally, before attempting to delete a resource group, ensure that any underlying resource locks are removed.

    Deletion can also fail if the resources are connected to resources in other resource groups that aren't being deleted. For example, you can't delete a virtual network with subnets that are still in use by a virtual machine.

    Refer: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell

    So, request you to validate the below:

    If everything appears correct and you are still unable to delete the Resource Group, it may be due to a backend operation being stuck and needing resolution. Raising a support ticket with Azure support for further assistance would be the best course of action.

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments