Skip to content

Commit 88798b7

Browse files
Merge pull request #231993 from gasridha/gasridha-Func-networking
Gasridha func networking
2 parents 7146442 + 8cbbaa8 commit 88798b7

File tree

3 files changed

+123
-239
lines changed

3 files changed

+123
-239
lines changed

articles/azure-functions/configure-networking-how-to.md

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,57 @@
11
---
22
title: How to configure Azure Functions with a virtual network
33
description: Article that shows you how to perform certain virtual networking tasks for Azure Functions.
4-
ms.topic: conceptual
5-
ms.date: 03/04/2022
4+
ms.topic: how-to
5+
ms.date: 03/24/2023
66
ms.custom: template-how-to
77
---
88

99
# How to configure Azure Functions with a virtual network
1010

11-
This article shows you how to perform tasks related to configuring your function app to connect to and run on a virtual network. For an in-depth tutorial on how to secure your storage account, please refer to the [Connect to a Virtual Network tutorial](functions-create-vnet.md). To learn more about Azure Functions and networking, see [Azure Functions networking options](functions-networking-options.md).
11+
This article shows you how to perform tasks related to configuring your function app to connect to and run on a virtual network. For an in-depth tutorial on how to secure your storage account, refer to the [Connect to a Virtual Network tutorial](functions-create-vnet.md). To learn more about Azure Functions and networking, see [Azure Functions networking options](functions-networking-options.md).
1212

1313
## Restrict your storage account to a virtual network
1414

15-
When you create a function app, you must create or link to a general-purpose Azure Storage account that supports Blob, Queue, and Table storage. You can replace this storage account with one that is secured with service endpoints or private endpoints. When configuring your storage account with private endpoints, public access to your storage account is not automatically disabled. In order to disable public access to your storage account, configure your storage firewall to allow access from only selected networks.
15+
When you create a function app, you must create or link to a general-purpose Azure Storage account that supports Blob, Queue, and Table storage. You can secure a new storage account behind a virtual network during account creation. At this time, you can't secure an existing storage account being used by your function app in the same way.
1616

17+
> [!NOTE]
18+
> Securing your storage account is supported for all tiers in both Dedicated (App Service) and Elastic Premium plans. Consumption plans currently don't support virtual networks.
1719
20+
### During function app creation
1821

19-
> [!NOTE]
20-
> This feature currently works for all Windows and Linux virtual network-supported SKUs in the Dedicated (App Service) plan and for Windows Elastic Premium plans. Consumption tier isn't supported.
22+
You can create a new function app along with a new storage account 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:
23+
24+
# [Azure portal](#tab/portal)
25+
26+
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).
27+
28+
# [Deployment templates](#tab/templates)
29+
30+
Use Bicep or Azure Resource Manager (ARM) [quickstart templates](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.web/function-app-storage-private-endpoints) to create secured function app and storage account resources.
31+
32+
---
33+
34+
### Existing function app
35+
36+
When you have an existing function app, you can't 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.
37+
38+
To secure the storage for an existing function app:
39+
40+
1. Choose a function app with a storage account that doesn't have service endpoints or private endpoints enabled.
2141

22-
To set up a function with a storage account restricted to a private network:
42+
1. [Enable virtual network integration](./functions-networking-options.md#enable-virtual-network-integration) for your function app.
2343

24-
1. Create a function with a storage account that does not have service endpoints enabled.
44+
1. Create or configure a second storage account. This is going to be the secured storage account that your function app uses instead.
2545

26-
1. Configure the function to connect to your virtual network.
46+
1. [Create a file share](../storage/files/storage-how-to-create-file-share.md#create-a-file-share) in the new storage account.
2747

28-
1. Create or configure a different storage account. This will be the storage account we secure with service endpoints and connect our function.
48+
1. Secure the new storage account in one of the following ways:
2949

30-
1. [Create a file share](../storage/files/storage-how-to-create-file-share.md#create-a-file-share) in the secured storage account.
50+
* [Create a private endpoint](../storage/common/storage-private-endpoints.md#creating-a-private-endpoint). When using private endpoint connections, the storage account must have private endpoints for the `file` and `blob` subresources. For Durable Functions, you must also make `queue` and `table` subresources accessible through private endpoints.
3151

32-
1. Enable service endpoints or private endpoint for the storage account.
33-
* If using private endpoint connections, the storage account will need a private endpoint for the `file` and `blob` sub-resources. If using certain capabilities like Durable Functions, you will also need `queue` and `table` accessible through a private endpoint connection.
34-
* If using service endpoints, enable the subnet dedicated to your function apps for storage accounts.
52+
* [Enable a service endpoint from the virtual network](../storage/common/storage-network-security.md#grant-access-from-a-virtual-network). When using service endpoints, enable the subnet dedicated to your function apps for storage accounts on the firewall.
3553

36-
1. Copy the file and blob content from the function app storage account to the secured storage account and file share.
54+
1. Copy the file and blob content from the current storage account used by the function app to the newly secured storage account and file share.
3755

3856
1. Copy the connection string for this storage account.
3957

0 commit comments

Comments
 (0)