Make sure that you have deleted all resources connected to the vnet/subnet is deleted before you try to delete the vnet/subnet itself. On azure portal go to Dashboard->All Resources and see if there are any hidden resources exists. You may adjust the filters as below to check it
Can't delete a VNet/Subnet
RW
1
Reputation point
I have a problem where I can't delete a vnet/subnet either through the portal or az cli calls. I've had this vnet for a long time.
Early on I was deploying an app service and wanted to bind it to the subnet so it could access a storage account. I've been trying to delete it ever since.
I followed the advice/article here: https://learn.microsoft.com/en-us/answers/questions/119340/unable-to-delete-virtual-network.html
These steps didn't help. It is the only thing I have in my account right now, so I'm sure it's not bound to anything that would keep it from being deleted.
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
1 answer
Sort by: Most helpful
-
Manu Philip 20,486 Reputation points MVP Volunteer Moderator2021-04-13T16:20:00.307+00:00