Unable to delete a subnet in my resourcegroup - azure

When i am trying to delete the subnet from my Resource group I am getting this error.
Failed to delete subnet 'app_subnet'. Error: Subnet app_subnet is in use.
This subnet was left after I tried clearing all the deployment in my resourcegroup which was an app service.
Able to remove the subnet so I can delete the resourcegroup.

You can try the below mentioned workaround.
Create App Service Plan with the same name as the deleted one
Create App Service with the same name as the deleted one
Link App Service with the VNET subnet
Disconnect VNet from App Service -> Networking -> VNet integration -> Disconnect
Delete subnet
Additionally you can also create a ticket to Azure Support via "Help & Support" to get it deleted.

Related

Why Azure app service VNET integration failing with new subnet?

I'm trying to connect my app service plan in to VNET. But always failed. I have red threads and everywhere saying App service plan should be Standard or higher.
My App service Plan is S1.
It's just an empty app.
I'm creating new subnet (not select existing one) when configuring VNET.
I have run the trouble-shooter and no issue found with connectivity
Can someone help on this?
There are some limitations with using regional virtual network integration:
Refer MsDoc
If you have already one VNet associated with an app service plan, it would be better if you create a new app service plan and then configure the VNet. I found the same fix here by #Asish Punnose.
"App service plan, VNet as well as App" should be in the same region.
The integration subnet can only use one App Service plan
After considering all the above limitations, I was able to configure VNet successfully.
By adding a new subnet, enabling inbound & outbound traffic addresses with a new virtual network as well as new app service plan I could create an app with standard s1 plan.
Added subnets under VNet integration:
Configured VNet with an app service plan without any error:
Issue was my VNET and App service in different subscription .
But in same region. move app service in to other subscription which contains VNET. Problem solved.
Seems to be VNET integration not working between Resorces in multipole subscriptions .Cheers

Unable to delete the Azure Subnet that is associated with PowerPlatform Data Gateway

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.

Azure Application Gateway: Subnet must only have application gateway

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.

Unable to delete subnet and virtual network in azure

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.

Azure: Failed to add delegation to the existing subnet

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.

Resources