Hello Olzhas Satpayev
I understand you are having trouble deleting a VNet due to service association links or App Service links. This can happen when those links cause dependencies that prevent deletion. Here’s what you can do:
1.Check for Dependencies: Ensure that there are no resources still using the VNet. This includes any virtual machines, load balancers, application gateways, or Azure Container Instances.
2.Change Subnet Delegation:
- Navigate to the subnet in the Azure Portal.
- Change the subnet delegation to None.
3.Delete Network Profiles: Use the Azure CLI to delete any associated network profiles:
az network profile delete --name <network-profile-name> --resource-group <resource-group-name>
4.Delete Service Association Links: If the steps above don’t work and the error persists, you can try to remove the service association link explicitly using the following CLI command:
az resource delete --ids /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/virtualNetworks/<vnet-name>/subnets/<subnet-name>/providers/Microsoft.Web/serviceAssociationLinks/AppServiceLink --api-version <api-version>
Refer:
Microsoft Documentation-Unable to delete VNet due to SAL
Please don’t forget to close the thread by clicking "Accept the answer" and "Yes" wherever the information provided helps you, as this can be beneficial to other community members.