0
votes

I would like to restrict access to my CosmosDB to only an Azure Function by using a virtual network (VNET). I would also like the performance improvement of a virtual network.

https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-configure-vnet-service-endpoint

According to the documentation I have Azure Functions cannot connect to a Virtual Network. (See networking limits in app service plan description below)

https://azure.microsoft.com/en-ca/pricing/details/app-service/plans/

Has anyone found a way to connect their Azure Function to a virtual network?

1

1 Answers

2
votes

In the link you provide, VNET is available to App Service Plans Standard, Premium, and Isolated.

Consumption Plan Functions do not support VNETs, so the resolution would be to run your Azure Functions in App Service Mode. Reference: https://docs.microsoft.com/azure/azure-functions/functions-create-vnet