Hi there,
Removing a function failed with an error:
An operation on the Virtual Network has failed. Details: {"error":{"code":"ResourceNotFound","message":"The Resource 'Microsoft.Network/virtualNetworks/vnet-myvnetname' under resource group 'rg-mygroupname' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}}
To create a function I followed Tutorial: Integrate Azure Functions with an Azure virtual network by using private endpoints. After testing I tried to clean up the resources using az cli
as group delete --name 'rg-mygroupname'
The same error when using Azure Portal and az functionapp delete
It took 12 hours to run but a function and application service plan are not removed but all other resources are deleted. And resource group status is success again not deleting.
As I understand the problem is vnet-myvnetname is removed but myfunction is still referring to one of the subnet. But vnet is already removed.
az functionapp vnet-integration list --name myfunction -g rg-mygroupname
I am getting an error above when trying to remove vnet-integraion:
az functionapp vnet-integration remove --name myfunction -g rg-mygroupname
How can I remove an Azure Function app in this situation?