unable to delete subnet after removing app service

Josh Basquez 0 Reputation points Microsoft Employee
2024-04-17T03:33:19.8166667+00:00

I am unable to delete a vnet after removing the app service while a service association link remained. The error is as follows: [some unique IDs hidden ]

Failed to delete resource group rg_m365wordpress: Deletion of resource group 'rg_m365wordpress' failed as resources with identifiers 'Microsoft.Network/virtualNetworks/xxx-vnet' could not be deleted. The provisioning state of the resource group will be rolled back. The tracking Id is 'xxxxxxxxxx33-a76ad86e7630'. Please check audit logs for more details. (Code: ResourceGroupDeletionBlocked) Subnet m365mail-dca9e8b7c5-dbsubnet is in use by /subscriptions/xxxxxxx952846/resourceGroups/rg_m365wordpress/providers/Microsoft.Network/virtualNetworks/xxxxxxxxx270a-vnet/subnets/xxxxxxxxx8b7c5-dbsubnet/serviceAssociationLinks/2138170f-c6ad-9808-1064-f5bc6701dd1d-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/xxxxxxxxxxxx6e952846/resourceGroups/rg_m365wordpress/providers/Microsoft.Network/virtualNetworks/xxxxxxxxx7270a-vnet)

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

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 47,591 Reputation points Microsoft Employee
    2024-04-17T05:48:25.5133333+00:00

    Hello @Josh Basquez ,

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

    I understand that you are unable to delete a subnet after removing app service and getting a "subnet is in use by serviceAssociationLinks" error.

    As you already reached out to us via email, we suggested you try the below workaround:

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-networking-options?tabs=azure-portal#deleting-the-app-service-plan-or-web-app-before-disconnecting-the-vnet-integration

    You tried the workaround, but the issue persisted and since you didn't have a support plan, we enabled a one-time free support ticket for your issue.

    The support team investigated the issue and suggested the next steps for resolution.

    Kindly let us know if 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