An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
Hi Brian, please find the summary of our discussion and resolution over Teams.
Issue: The underlying container app and foundry tool was deleted but the subnets became orphaned. And subneta were not even when we tried below commands as well.
- Try to force backend purge using the Azure REST API for orphaned
legionservicelinkassociations. You can trigger this from the Azure Cloud Shell:az rest --method POST \ --uri "/subscriptions/<SUBSCRIPTION-ID>/providers/Microsoft.Web/locations/<LOCATION>/purgeUnusedVirtualNetworkIntegration?api-version=2024-04-01" \ --body "{'subnetResourceId': '/subscriptions/<SUBSCRIPTION-ID>/resourceGroups/core_rg/providers/Microsoft.Network/virtualNetworks/my-network/subnets/agents'}" - After running the above command, run the command below to delete the subnet:
az network vnet subnet delete --resource-group xxx-rg --vnet-name xxxVnet --name xxxSubnet
Cause: There were serviceAssociationLinks which were lingering in backend which were blocking the subnet deletion.
Resolution: With the help of backend team, we purged the serviceAssociationLinks and you were able to delete the subnets after that.