I am just practicing the azure. And I created a virtual network and subnets.
Now I am not able to delete the subnet. I have disconnected all connected devices from the virtual network.
Here is the error getting while deleting subnet
Please help me to clean up the subnet and virtual network.
Thanks
Additional details
All resources in my account
And here is the subnets tab and error getting while deletion:
Subnet configuration:
As the error shows the subnet PrivateSubnet should be in use. And you can see it's delegated to the service Microsoft.Web/serverfarms. So you need to remove the delegated service first. Do it follow the steps here. When the delegated service list is empty, then you can delete the subnet as you want.
Update:
According to my experience, your subnet is in use network/PrivateSubnet/AppLink, it means there is a Web App integrate with your subnet at least. And I didn't see the Web App in your resource group. So I guess there someone else uses your subnet and his Web App still exists. You need to check it yourself.
Related
I have a Subnet in Azure that is associated with PowerPlatform Data Gateway
I am unable to delete the subnet
Failed to delete subnet 'np-dat-powerplatform-subnet'. Error: Subnet
np-dat-powerplatform-subnet is in use by
ipz12-dat-np-connections-rg/providers/Microsoft.Network/virtualNetworks/np-dat-hub-vnet/subnets/np-dat-powerplatform-subnet/serviceAssociationLinks/PowerPlatformSAL'>np-dat-hub-vnet/np-dat-powerplatform-subnet/PowerPlatformSAL
and cannot be deleted. In order to delete the subnet, delete all the
resources within the subnet. See aka.ms/deletesubnet.
This error usually occurs when the subnet is delegated to an Azure Service. From the screenshot above I can see that you subnet np-dat-powerplatform-subnet has a delegation. In order to delete the subnet, you need to remove this delegation first. You can follow the steps mentioned here to remove the subnet delegation. If you are unable to remove the delegation via Portal, you can also try running the Az CLI and PowerShell commands mentioned in the document above.
I'm trying to connect my Web App to the AKS LoadBalancer through the VNet integration instead of a public load balancer.
The problem here is to integrate VNet into the web app, the VNet needs to have a subnet delegated to Microsoft.Web/serverFarms. On the other hand, AKS cannot be assigned with a subnet that has a delegation.
I have found this that seemingly has done the exact same thing but it seems to be old as I cannot reproduce the same result. Either I get
VNET aks-subnet is missing a delegation to Microsoft.Web/serverFarms. Please add the delegation and try again. or aks-subnet cannot be used as it's a delegated subnet
I have tried to add two subnets one with delegation to managedClusters and use that for my AKS but the same ... cannot be used as it's a delegated subnet happens.
sidenote: I'm using the bicep script to deploy.
VNET Integration requires a dedicated subnet for the App Service that is going to be integrated. This means the subnet cannot be used for any other purpose, i.E. hosting AKS or VMs.
The App Service can then reach services in other subnets on the same VNET or in peered VNETs.
Subnet Size Requirements are a minimum of /27 and Microsoft recommends /26 for production grade environments.
It is sometimes a little tricky to troubleshoot issues with VNET integration, some good hints are documented here.
I have a resource group with a virtual network in Azure. The virtual network has subnets, but they are not appearing in the list, nor are they returned by the following cloud shell line:
az network vnet subnet list --vnet-name [vnet] --resource-group [resource group]
You would think that this is because they do not exist. However, one of these subnets has a load balancer, and two more have running containers in them. These resources are all still working. I can still access the containers through the load balancer, and the containers still have the same private IP addresses as before.
Furthermore, I can create create a new subnet with the same address space and Azure does not raise any errors or objections, then delete that subnet, and the load balancer and containers are still running just fine.
I think the problem may have been created when I created a new virtual machine in a fourth subnet of this network that had already been Delegated to ContainerInstance. You would think that Azure would throw an error and not let me do that, for everything else it complains about, but here we are.
Is there some kind of orphan virtual network that these subnets are in now? How do I troubleshoot this?
Thank you.
I tested in my environment working fine for me and able to get details of all of my subnet under a specific VNET even though for few of my subnet is delegated to particuler service and few of them attached to resources.
Furthermore, I can create create a new subnet with the same address
space and Azure does not raise any errors or objections, then delete
that subnet, and the load balancer and containers are still running
just fine
Not sure how this can be happened with you that should not be expected. I would suggest you to troubleshoot this kind of situation please reach out to Azure Support team.
Is there some kind of orphan virtual network that these subnets are in
now? How do I troubleshoot this?
No if there already some of your resources uses that VNEt and their subnet so this can not be terated as Orphan.
I'm facing an error - "Subnet must only have application gateway" while creating an Application Gateway for in my azure network.
I'm following the steps from thid document: https://learn.microsoft.com/en-us/azure/application-gateway/create-url-route-portal
Tried to look around but could not find any solution.
Tested in my environment working fine for me , You need to create a seperate subnet for application gateway. you cannot use the subnet that is accomplished with other resources. Like wise you can see in below i selected AzureBastionSubnet ie already using with bastion.
Once i created seperate subnet for AppGtw it is working fine.
Note : If you are using the subnet that is already accomplished with other reources for that subnet you need to Select NSG None.
I'm trying to include in an app service an existing VNET but I have this issue:
Failed to add delegation to the existing subnet.:
Delegations of subnet /subscriptions
Cannot be changed from [] to [Microsoft.Web/serverfarms] because it is being used by the resource
Azure Limitation ? How many resources can be used by one VNET ?
The limit is that you have to use an unused subnet for your app service integration When you add VNet (preview) in the networking configuration of app service. Please check if you have any VM resources in that subnet. If it is, you could create an empty subnet for the VNet integration. Read more details here.