Forum Discussion
Simon_Geary
Sep 05, 2024Brass Contributor
Cannot delete Azure Function as vnet no longer exists
I have an Azure Function I would like to delete. The Function was integrated to a vnet that existed in a different resource group, and that resource group was deleted. Now it is not possible ...
kyazaferr
Sep 05, 2024MCT
Remove VNet Integration using Azure CLI
Sometimes, even if the VNet no longer exists, the VNet integration settings remain attached to the Function App.
Use Azure CLI to remove the VNet integration manuall
az webapp vnet-integration remove --name <function-app-name> --resource-group <resource-group-name>
. Force Deletion using Azure CLI or PowerShell
If the regular deletion methods are blocked, try forcing the deletion using Azure CLI or PowerShell:
Azure CLI:
az functionapp delete --name <function-app-name> --resource-group <resource-group-name>
Use Azure Resource Explorer
Navigate to Azure Resource Explorer and manually locate the Azure Function.
You can try to remove the references to the VNet or delete the function from the JSON template directly in the portal.
Sometimes, even if the VNet no longer exists, the VNet integration settings remain attached to the Function App.
Use Azure CLI to remove the VNet integration manuall
az webapp vnet-integration remove --name <function-app-name> --resource-group <resource-group-name>
. Force Deletion using Azure CLI or PowerShell
If the regular deletion methods are blocked, try forcing the deletion using Azure CLI or PowerShell:
Azure CLI:
az functionapp delete --name <function-app-name> --resource-group <resource-group-name>
Use Azure Resource Explorer
Navigate to Azure Resource Explorer and manually locate the Azure Function.
You can try to remove the references to the VNet or delete the function from the JSON template directly in the portal.