Hi Shawn Yap
Welcome to the Microsoft Q&A Platform. Thank you for reaching out, and I hope you are doing well.
If VNet intigration is not associated with any app serive, but the subnet is still associated with the Service Association Link, you can use an alternate approach. Create an App Service Plan
with the same name as the existing one, then create an App Service
with the same name as the deleted one and link the App Service to the VNet subnet.
Once you integrate the VNet into the App Service, use the below command to check if the application is integrated with the VNet
Note: If the VNet is associated with any applications, such as a webapp, the Service Association Link will automatically be added to the subnet, preventing the VNet from being deleted.
az network vnet subnet show -g $ResourceGroupName -n $SubnetName --vnet-name $VNetName
Output
If the Service Association Link is attached to the subnet, make sure to remove the VNet integration and subnet delegation from the subnet
az webapp vnet
After removing the Vnet intigration in the app service, the Service Association Link has been removed from the subnet.
After removing the VNet integration and subnet delegation, I am able to delete the subnet that is associated with the.Service Association Link
Reference: Unable to delete VNet due to serviceAssociationLinks/AppServiceLink - Microsoft Q&A
Hope this helps!
If the above is unclear and/or you are unsure about something, add a comment below.
Please don’t forget to close the thread by clicking “Accept the answer” wherever the information provided helps you, as this can be beneficial to other community members.