Share via

WEBSITE_CONTENTOVERVNET setting is not legacy and is required for Functions and Logic Apps using Secured Storage Accounts

Martin 5 Reputation points
2025-04-14T01:29:49.7433333+00:00

The MS documentation states the following app setting for Logic Apps and Function Apps is legacy

WEBSITE_CONTENTOVERVNET and should be replaced with WEBSITE_CONTENTSHARE when using private endpoints on secure storage accounts with Azure Functions and Logic Apps.

This is however false and without WEBSITE_CONTENTOVERVNET set to 1 our deployments fail. Setting the new WEBSITE_CONTENTSHARE setting doesn't work.

Please update your documentation as this setting is clearly not legacy and is required otherwise deployments with Terraform fail. See below documents which should be corrected:

Azure Functions
Azure Functions

An Azure service that provides an event-driven serverless compute platform.


1 answer

Sort by: Most helpful
  1. Sina Salam 28,281 Reputation points Volunteer Moderator
    2026-03-29T13:13:13.5433333+00:00

    Hello Martin,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that your WEBSITE_CONTENTOVERVNET setting is not legacy and is required for Functions and Logic Apps using Secured Storage Accounts.

    To resolve the issue, follow the below steps:

    Step 1:

    Configure content over VNet and the content share: az functionapp config appsettings set -g <rg> -n <app> --settings WEBSITE_CONTENTOVERVNET=1 WEBSITE_CONTENTSHARE=<share> WEBSITE_CONTENTAZUREFILECONNECTIONSTRING="<conn>" (see App settings reference and Azure Files note on connection strings in the Functions host repo GitHub. - https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings

    Step 2:

    Lock Storage to your VNet and/or add a Private Endpoint for File subresource: az storage account network-rule add --account-name <sa> --vnet-name <vnet> --subnet <subnet>; az network private-endpoint create -g <rg> -n <pe> --vnet-name <vnet> --subnet <subnet> --private-connection-resource-id <saId> --group-ids file Configure Azure Files endpoints; Functions VNet+PE tutorial.

    Step 3:

    Enable regional VNet integration and force egress through VNet: az functionapp vnet-integration add -g <rg> -n <app> --vnet <vnet> --subnet <subnet>; az functionapp config appsettings set -g <rg> -n <app> --settings WEBSITE_VNET_ROUTE_ALL=1 (Networking options; background on WEBSITE_VNET_ROUTE_ALL (blog) ()). - https://github.com/Azure/azure-functions-host/issues/8135. This helps you integrate the Function and route all.

    Step 4:

    If supported in your API version, turn on the newer site flag: az resource update -g <rg> -n <app> --resource-type Microsoft.Web/sites --set properties.vnetContentShareEnabled=true (documented in App settings/site properties and surfaced in the built‑in policy for config routing (AzAdvertizer). - https://learn.microsoft.com/en-us/azure/storage/files/storage-files-networking-endpoints

    Step 5:

    Implement model dependencies so the Function app waits for storage+share+networking: resource func 'Microsoft.Web/sites@2023-01-01' = { name: appName; properties:{}; dependsOn: [ fileShare, privateEndpoint, vnetLink ] } (see Microsoft sample template with VNet integration (GitHub) () and the VNet + Private Endpoint tutorial flow. - https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-vnet and https://learn.microsoft.com/en-us/azure/azure-functions/functions-networking-options gives more insight.

    Step 6:

    Ensure *.file.core.windows.net resolves to the PE via a Private DNS zone and link: az network private-dns zone create -g <rg> -n privatelink.file.core.windows.net && az network private-dns link vnet create -g <rg> -n <link> -z privatelink.file.core.windows.net -v <vnet> --registration-enabled false Azure Files DNS forwarding; Private Endpoint DNS zones. This helps in fixing DNS for Private Endpoint.

    Step 7:

    Lastly, for secured storage scenarios, keep WEBSITE_CONTENTOVERVNET=1 alongside the content share settings to ensure reliable content mounting over private networking (see App settings reference and practical PE guidance for Functions (blog) ()). - https://www.thebestcsharpprogrammerintheworld.com/2020/07/20/website_vnet_route_all-and-azure-functions/

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.