You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/configure-networking-how-to.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: How to use a secured storage account with Azure Functions
3
3
description: Article that shows you how to use a secured storage account in a virtual network as the default storage account for a function app in Azure Functions.
4
4
ms.topic: how-to
5
-
ms.date: 05/06/2024
5
+
ms.date: 06/03/2024
6
6
ms.custom: template-how-to, build-2024
7
7
---
8
8
@@ -12,23 +12,26 @@ This article shows you how to connect your function app to a secured storage acc
12
12
13
13
## Restrict your storage account to a virtual network
14
14
15
-
When you create a function app, you either create a new storage account or link to an existing one. Currently, only [ARM template and Bicep deployments](functions-infrastructure-as-code.md#secured-deployments) support function app creation with an existing secured storage account.
15
+
When you create a function app, you either create a new storage account or link to an existing one. Currently, only the Azure portal, [ARM template deployments](functions-infrastructure-as-code.md?tabs=json&pivots=premium-plan#secured-deployments), and [Bicep deployments](functions-infrastructure-as-code.md?tabs=bicep&pivots=premium-plan#secured-deployments) support function app creation with an existing secured storage account.
16
16
17
17
> [!NOTE]
18
18
> Securing your storage account is supported for all tiers of the [Dedicated (App Service) plan](./dedicated-plan.md) and the [Elastic Premium plan](./functions-premium-plan.md), as well as in the [Flex Consumption plan](./flex-consumption-plan.md).
19
-
> Consumption plans don't support virtual networks.
19
+
> The [Consumption plan](consumption-plan.md) doesn't support virtual networks.
20
20
21
21
For a list of all restrictions on storage accounts, see [Storage account requirements](storage-considerations.md#storage-account-requirements).
You can create a function app along with a new storage account secured behind a virtual network that is accessible via private endpoints. The following links show you how to create these resources by using either the Azure portal or by using deployment templates:
27
+
You can create a function app along with a new storage account that is secured behind a virtual network. The following links show you how to create these resources by using either the Azure portal or by using deployment templates:
28
28
29
29
### [Azure portal](#tab/portal)
30
30
31
-
Complete the following tutorial to create a new function app a secured storage account: [Use private endpoints to integrate Azure Functions with a virtual network](functions-create-vnet.md).
31
+
Complete the steps in [Create a function app in a Premium plan](functions-create-vnet.md#create-a-function-app-in-a-premium-plan). This section of the virtual networking tutorial shows you how to create a function app that connects to storage over private endpoints.
32
+
33
+
> [!NOTE]
34
+
> When you create your function app in the Azure portal, you can also choose an existing secured storage account in the **Storage** tab. However, you must configure the appropriate networking on the function app so that it can connect through the virtual network used to secure the storage account. If you don't have permissions to configure networking or you haven't fully prepared your network, select **Configure networking after creation** in the **Networking** tab. You can configure networking for your new function app in the portal under **Settings** > **Networking**.
32
35
33
36
### [Deployment templates](#tab/templates)
34
37
@@ -38,7 +41,9 @@ Use Bicep files or Azure Resource Manager (ARM) templates to create a secured fu
38
41
39
42
## Secure storage for an existing function app
40
43
41
-
When you have an existing function app, you can't directly secure the storage account currently being used by the app. You must instead swap-out the existing storage account for a new, secured storage account.
44
+
When you have an existing function app, you can directly configure networking on the storage account being used by the app. This process results in your app being down while you configure networking and while your app restarts.
45
+
46
+
To minimize downtime, you can instead swap-out an existing storage account for a new, secured storage account.
42
47
43
48
### 1. Enable virtual network integration
44
49
@@ -70,6 +75,10 @@ Now you're ready to configure your function app to communicate with the newly se
70
75
71
76
### 3. Enable application and configuration routing
72
77
78
+
> [!NOTE]
79
+
> These configuration steps are only required for the [Elastic Premium](./functions-premium-plan.md) and [Dedicated (App Service)](./dedicated-plan.md) hosting plans.
80
+
> The [Flex Consumption plan](./flex-consumption-plan.md) doesn't require site settings to configure networking.
81
+
73
82
You should now route your function app's traffic to go through the virtual network.
74
83
75
84
1. Enable [application routing](../app-service/overview-vnet-integration.md#application-routing) to route your app's traffic into the virtual network.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-app-settings.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -621,13 +621,16 @@ Azure Files doesn't support using managed identity when accessing the file share
621
621
622
622
## WEBSITE\_CONTENTOVERVNET
623
623
624
-
A value of `1` enables your function app to scale when you have your storage account restricted to a virtual network. You should enable this setting when restricting your storage account to a virtual network. Only required when using `WEBSITE_CONTENTAZUREFILECONNECTIONSTRING`. To learn more, see [Restrict your storage account to a virtual network](configure-networking-how-to.md#restrict-your-storage-account-to-a-virtual-network).
624
+
> [!IMPORTANT]
625
+
> WEBSITE_CONTENTOVERVNET is a legacy app setting that has been replaced by the [vnetContentShareEnabled](#vnetcontentshareenabled) site property.
626
+
627
+
A value of `1` enables your function app to scale when you have your storage account restricted to a virtual network. You should enable this setting when restricting your storage account to a virtual network. Only required when using `WEBSITE_CONTENTSHARE` and `WEBSITE_CONTENTAZUREFILECONNECTIONSTRING`. To learn more, see [Restrict your storage account to a virtual network](configure-networking-how-to.md#restrict-your-storage-account-to-a-virtual-network).
625
628
626
629
|Key|Sample value|
627
630
|---|------------|
628
631
|WEBSITE_CONTENTOVERVNET|`1`|
629
632
630
-
Supported on [Premium](functions-premium-plan.md) and [Dedicated (App Service) plans](dedicated-plan.md) (Standard and higher). Not supported when running on a [Consumption plan](consumption-plan.md).
633
+
This app setting is required on the [Elastic Premium](functions-premium-plan.md) and [Dedicated (App Service) plans](dedicated-plan.md) (Standard and higher). Not supported when running on a [Consumption plan](consumption-plan.md).
631
634
632
635
## WEBSITE\_CONTENTSHARE
633
636
@@ -772,7 +775,7 @@ Indicates whether to use a specific [cold start](event-driven-scaling.md#cold-st
772
775
> [!IMPORTANT]
773
776
> WEBSITE_VNET_ROUTE_ALL is a legacy app setting that has been replaced by the [vnetRouteAllEnabled](#vnetrouteallenabled) site setting.
774
777
775
-
Indicates whether all outbound traffic from the app is routed through the virtual network. A setting value of `1` indicates that all traffic is routed through the virtual network. You need this setting when using features of [Regional virtual network integration](functions-networking-options.md#regional-virtual-network-integration). It's also used when a [virtual network NAT gateway is used to define a static outbound IP address](functions-how-to-use-nat-gateway.md).
778
+
Indicates whether all outbound traffic from the app is routed through the virtual network. A setting value of `1` indicates that all application traffic is routed through the virtual network. You'll need this setting when configuring [Regional virtual network integration](functions-networking-options.md#regional-virtual-network-integration) in the Elastic Premium and Dedicated hosting plans. It's also used when a [virtual network NAT gateway is used to define a static outbound IP address](functions-how-to-use-nat-gateway.md).
776
779
777
780
|Key|Sample value|
778
781
|---|------------|
@@ -827,9 +830,19 @@ Sets the specific version of PowerShell on which your functions run. For more in
827
830
828
831
When running locally, you instead use the [`FUNCTIONS_WORKER_RUNTIME_VERSION`](functions-reference-powershell.md#running-local-on-a-specific-version) setting in the local.settings.json file.
829
832
833
+
### vnetContentShareEnabled
834
+
835
+
Apps running in a Premium plan use a file share to store content. The name of this content share is stored in the [`WEBSITE_CONTENTSHARE`](#website_contentshare) app setting and its connection string is stored in [`WEBSITE_CONTENTAZUREFILECONNECTIONSTRING`](#website_contentazurefileconnectionstring). To route traffic between your function app and content share through a virtual network, you must also set `vnetContentShareEnabled` to `true`. Enabling this site property is a requirement when [restricting your storage account to a virtual network](configure-networking-how-to.md#restrict-your-storage-account-to-a-virtual-network) in the Elastic Premium and Dedicated hosting plans.
836
+
837
+
This site property replaces the legacy [`WEBSITE_CONTENTOVERVNET`](#website_contentovervnet) setting.
838
+
839
+
### vnetImagePullEnabled
840
+
841
+
Functions [supports function apps running in Linux containers](functions-how-to-custom-container.md). To connect and pull from a container registry inside a virtual network, you must set `vnetImagePullEnabled` to `true`. This site property is supported in the Elastic Premium and Dedicated hosting plans. The Flex Consumption plan doesn't rely on site properties or app settings to configure Networking. For more information, see [Flex Consumption plan deprecations](#flex-consumption-plan-deprecations).
842
+
830
843
### vnetRouteAllEnabled
831
844
832
-
Indicates whether all outbound traffic from the app is routed through the virtual network. A setting value of `1` indicates that all traffic is routed through the virtual network. You need this setting when using features of [Regional virtual network integration](functions-networking-options.md#regional-virtual-network-integration). It's also used when a [virtual network NAT gateway is used to define a static outbound IP address](functions-how-to-use-nat-gateway.md). For more information, see [Configure application routing](../app-service/configure-vnet-integration-routing.md#configure-application-routing).
845
+
Indicates whether all outbound traffic from the app is routed through the virtual network. A setting value of `true` indicates that all application traffic is routed through the virtual network. Use this setting when configuring [Regional virtual network integration](functions-networking-options.md#regional-virtual-network-integration) in the Elastic Premium and Dedicated plans. It's also used when a [virtual network NAT gateway is used to define a static outbound IP address](functions-how-to-use-nat-gateway.md). For more information, see [Configure application routing](../app-service/configure-vnet-integration-routing.md#configure-application-routing).
833
846
834
847
This site setting replaces the legacy [WEBSITE\_VNET\_ROUTE\_ALL](#website_vnet_route_all) setting.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-networking-options.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -304,6 +304,18 @@ When testing functions in a function app with private endpoints, you must do you
304
304
*`https://functions.azure.com`
305
305
*`https://portal.azure.com`
306
306
307
+
If you've restricted access to your function app with private endpoints or any other access restriction, you also must add the service tag `AzureCloud` to the allow-list. To update the allow-list:
308
+
309
+
1. Navigate to your function app and select **Settings** > **Networking** and then select **Inbound access configuration** > **Public network access**.
310
+
311
+
1. Make sure that **Public network access** is set to **Enabled from select virtual networks and IP addresses**.
312
+
313
+
1.**Add a rule** under Site access and rules:
314
+
315
+
1. Select `Service Tag` as the Source settings **Type** and `AzureCloud` as the **Service Tag**.
316
+
317
+
1. Make sure the action is **Allow**, and set your desired name and priority.
Copy file name to clipboardExpand all lines: articles/azure-functions/run-functions-from-deployment-package.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ This section provides information about how to run your function app from a pack
85
85
86
86
<aname="troubleshooting"></a>
87
87
88
-
+When running a function app on Windows, the app setting `WEBSITE_RUN_FROM_PACKAGE = <URL>` gives worse cold-start performance and isn't recommended.
88
+
+Function apps running on Windows experience a slight increase in [cold start time](event-driven-scaling.md#cold-start) when the application package is deployed to a URL endpoint via `WEBSITE_RUN_FROM_PACKAGE = <URL>`.
89
89
+ When you specify a URL, you must also [manually sync triggers](functions-deployment-technologies.md#trigger-syncing) after you publish an updated package.
90
90
+ The Functions runtime must have permissions to access the package URL.
91
91
+ You shouldn't deploy your package to Azure Blob Storage as a public blob. Instead, use a private container with a [Shared Access Signature (SAS)](../storage/common/storage-sas-overview.md) or [use a managed identity](#fetch-a-package-from-azure-blob-storage-using-a-managed-identity) to enable the Functions runtime to access the package.
0 commit comments