An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
Hello,
Welcome to Microsoft Q&A,
The issue in Azure where you're unable to delete a subnet because it has a service association link. This usually means that a resource or service (such as a private link, network security group, or service endpoint) is still associated with that subnet, preventing its deletion.
First, you need to find out which resource is associated with the subnet. Common services that create these links include private endpoints, network security groups (NSGs), or service endpoints.
- Go to the Azure Portal > Virtual Network > Subnets. Try to view the details of the subnet that is not deleting.
- Look for any associated services or endpoints that are linked to the subnet.
- Private Endpoints: If there is a private endpoint, you need to remove it from the subnet.
- Navigate to the Private Endpoints section and check if there are any resources connected to the subnet. If so, you’ll need to delete those private endpoints.
- Network Security Groups (NSGs): If a NSG is applied to the subnet, remove it.
- In the Subnet section, under Network security group, you can unassociate or remove the NSG.
- Service Endpoints: If service endpoints are in use, go to the Service endpoints section and remove the endpoints associated with the subnet.
If there are any virtual machines, network interfaces, or other resources still in the subnet, they could be holding the association as well. You need to:
- Remove or migrate any resources in the subnet before attempting to delete it again.
Please Upvote and accept the answer if it helps!!