Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when assigning Virtual Network to the Azure Function

Tags:

azure

vnet

I am attempting to assign a VNET to the Azure Function on Flex Consumption plan. I am performing the following steps

  1. Login to Azure Portal and open function resource
  2. Go to Networking
  3. Under Virtual Network Details click on "not configured"
  4. Click "Add virtual network integration"
  5. Select my virtual network resource, and subnet of default (10.0.0.0 - 10.0.0.255)
  6. After about 60s I get a notification "Connecting site to virtual network: Failed to connect to the virtual network: An error has occurred."

I don't have support plan, but when I tried to open ticket I performed the diagnostics and it said that my VNET is good and I should be able to add it.

I expected the VNET to be assigned. The error message does not provide enough information for troubleshooting.

like image 920
Robert G Avatar asked Nov 16 '25 02:11

Robert G


1 Answers

I had similar issues without clear error messages. After filing a support ticket I was pointed to the following documentation: https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-plan#considerations

Make sure your Subnet delegation is set to: Microsoft.App/environments and that the Microsoft.App resource provider is registered for your subscription. Azure Functions Flex Consumption plan is part of Project Legion which brings Azure Container Apps and Azure Functions closer together, hence the requirement of Microsoft.App/environments instead of Microsoft.Website

like image 132
Dibran Avatar answered Nov 17 '25 23:11

Dibran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!