Failed to delete virtual network due to 'serviceAssociationLink'

Matthew LAM 0 Reputation points
2023-07-19T02:17:45.8833333+00:00

I have a few resource groups with resources created using the 'WordPress on App Service' in the Marketplace. I tried to delete them and encounter this error:

Failed to delete resource group [...]: Deletion of resource group 
'[...]' failed as resources with identifiers 
'Microsoft.Web/sites/[...],Microsoft.Network/virtualNetworks/[...]-vnet'
could not be deleted. The provisioning state of the resource group will
be rolled back. The tracking Id is 
'[...]'. Please check audit logs for more
details. (Code: ResourceGroupDeletionBlocked) undefined Subnet 
[...]-dbsubnet is in use by 
/subscriptions/[...]/resourceGroups/[...]/providers/Microsoft.Network/virtualNetworks/[...]-vnet/subnets/[...]-dbsubnet/serviceAssociationLinks/[...]-sal
and cannot be deleted. In order to delete the subnet, delete all the 
resources within the subnet. See aka.ms/deletesubnet. (Code: 
InUseSubnetCannotBeDeleted, Target: 
/subscriptions/[...]/resourceGroups/[...]/providers/Microsoft.Network/virtualNetworks/[...]-vnet)

I found that it is a known issue from this post: https://learn.microsoft.com/en-us/answers/questions/140197/unable-to-delete-vnet-due-to-serviceassociationlin

As I do not have support plan in this subscription, how can I ask the Azure Support to delete the resources for me?

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,625 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,257 questions
{count} votes

2 answers

Sort by: Most helpful
  1. RevelinoB 3,440 Reputation points
    2023-07-19T04:27:12.8433333+00:00

    Hi Matthew,

    If you don't have a support plan for your Azure subscription, you can still seek assistance from Microsoft Azure support by opening a free billing and subscription support case. Here's how you can do it:

    • Go to the Azure portal (https://portal.azure.com) and sign in with your Azure account.
    • Click on the "Help + support" option in the left-hand menu.
    • On the Help + support page, click on the "New support request" button.
    • In the "Basics" tab of the "New support request" page, select the appropriate options for the issue type, subscription, and resource group.
    • In the "Problem" tab, provide a detailed description of the issue you're facing, including the error message you received and the steps you've taken so far.
    • In the "Contact Information" tab, fill in your contact details.
    • Review the information provided and click on the "Create" button to submit your support request.

    Once your support request is submitted, Microsoft Azure support will review your case and provide guidance on how to proceed with deleting the resources causing the issue. They will assist you in resolving the problem even without a support plan, although response times may vary.

    Alternatively, you can also try the steps mentioned in the link you provided (https://learn.microsoft.com/en-us/answers/questions/140197/unable-to-delete-vnet-due-to-serviceassociationlin) to delete the resources manually, if you feel comfortable doing so. However, if you're not confident in executing those steps or if you encounter any issues, it's advisable to seek assistance from Azure support.

    I hope this helps?

    1 person found this answer helpful.
    0 comments No comments

  2. Manu Philip 19,271 Reputation points MVP
    2023-07-19T04:32:12.7733333+00:00

    This sort of issue can be seen, when resource removal is not followed as per Microsoft recommendation.
    You can try a force Update the resources through resources.Azure.com portal
    Visit resources.Azure.com, and find the subnet which has reported in the error as below: Subscription Name > resourceGroups > ResourceGroup Name > providers > Microsoft.Network >
    User's image

    At the right-side window, click Edit > PUT for a force update of the subnet. If the resource is stuck in a deletion, or updating state the operation helps to resolve the issue in most of the cases I see.
    Try to delete the resource after the above step and see if it helps!


    --please don't forget to upvote and Accept as answer if the reply is helpful--

    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.