Reputation: 13745
We had a resource group that included ADLS V2 and a VNET (to which the ADLS was connected through a service connection).
The entire resource group was deleted but the virtual network connection to Azure Storage appears to still be hanging around somehow and is preventing a re-deploy of the same. The error received is:
subnet with State NetworkSourceDeleted is required to be removed
Any idea how to resolve?
Upvotes: 3
Views: 1114
Reputation: 141
This can happen because when an resource group is deleted, Azure deletes the service connections after the resource group is deleted. An error might have occurred during this connection deletion due to which this service connection was not deleted and remained in NetworkSourceDeleted state. You will need to delete the service association links of subnet Run following commands:
SAL_ID=$(az network vnet subnet show --resource-group $resourceGroupName --vnet-name $vnetName --name $subnetName --query id --output tsv)/providers/Microsoft.ContainerInstance/serviceAssociationLinks/default
az resource delete --ids $SAL_ID --api-version 2018-07-01
Upvotes: 5