Failure to remove subnet due to AppServiceLink

Jeff Brown 0 Reputation points
2024-05-03T13:42:08.0833333+00:00

I have a subnet delegated to web apps (Microsoft.Web/serverFarms) with vnet integration. I removed the web apps and app service plan. However, I'm unable to delete the subnet now due to this error:

Failed to delete subnet '<subnet>'. Error: Subnet <subnet> is in use by <rg>/providers/Microsoft.Network/virtualNetworks/<vnet>/subnets/<subnet>/serviceAssociationLinks/AppServiceLink'><vnet>/<subnet>/AppServiceLink and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet.

Since I had the infrastructure in Terraform, I recreated the app service plan and web apps with the same names. I disabled vnet integration on the web apps manually but am still not able to remove the subnet.

This seems to be a common issue with Microsoft support usually needed to fix it on the backend:

https://github.com/MicrosoftDocs/azure-docs/issues/48902 https://learn.microsoft.com/en-us/answers/questions/140197/unable-to-delete-vnet-due-to-serviceassociationlin https://learn.microsoft.com/en-us/answers/questions/1499390/cannot-delete-a-subnet-due-to-appservicelink-and-t

However, I do not have a support agreement at the moment. There have been previous cases of MSFT providing support for this issue, so looking for guidance on how to proceed.

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,197 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,006 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 23,421 Reputation points Microsoft Employee
    2024-05-04T03:37:35.71+00:00

    @Jeff Brown

    A support request will be required to delete the resource. Please follow the instructions in the private message I will make here shortly to create a support request.

    Hoper this helps. Thank you

    0 comments No comments