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
::: zone pivot="programming-language-csharp,programming-language-java"
38
37
38
+
6. Select **Review + create** to review the app configuration you chose, and then select **Create** to provision and deploy the function app.
39
+
40
+
7. Select the **Notifications** icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
41
+
42
+
8. Select **Go to resource** to view your new function app. You can also select **Pin to dashboard**. Pinning makes it easier to return to this function app resource from your dashboard.
43
+
44
+
::: zone pivot="programming-language-csharp,programming-language-java"
39
45
At this point, under **Create functions in your preferred environment** select your choice of local development environments. This link takes you to one of these quickstart articles, the first part of which tells you how to create a code project with an HTTP triggered function:
6. Select **Review + create** to review the app configuration you chose, and then select **Create** to provision and deploy the function app.
137
+
138
+
7. Select the **Notifications** icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
139
+
140
+
8. Select **Go to resource** to view your new function app. You can also select **Pin to dashboard**. Pinning makes it easier to return to this function app resource from your dashboard.
141
+
136
142
### [Visual Studio Code](#tab/vs-code)
137
143
138
144
1. Press F1, and in the command pallet enter **Azure Functions: Create function app in Azure...(Advanced)**.
@@ -216,6 +222,103 @@ You can use Maven to create a Flex Consumption hosted function app and required
216
222
Maven uses settings in the pom.xml template to create your function app in a Flex Consumption plan in Azure, along with the other required resources. Should these resources already exist, the code is deployed to your function app, overwriting any existing code.
217
223
::: zone-end
218
224
225
+
## Enable virtual network integration
226
+
227
+
You can enable [virtual network integration](functions-networking-options.md#virtual-network-integration) for your app in a Flex Consumption plan. The examples in this section assume that you already have [created a virtual network with subnet](../virtual-network/quick-create-cli.md#create-a-virtual-network-and-subnet) in your account. You can enable virtual network integration when you create your app or at a later time.
228
+
229
+
To enable virtual networking when you create you app:
230
+
231
+
### [Azure CLI](#tab/azure-cli)
232
+
233
+
You can enable virtal network integration by your run the [`az functionapp create`] command by including the `--vnet` and `--subnet` parameters.
234
+
235
+
1. [Created the virtual network and subnet](../virtual-network/quick-create-cli.md#create-a-virtual-network-and-subnet), if you haven't already done so.
236
+
237
+
1. Complete steps 1-4 in [Create a Flex Consumption app](#create-a-flex-consumption-app) to create the resources required by your app.
238
+
239
+
1. Run the [`az functionapp create`] command, including the `--vnet` and `--subnet` parameters, as in this example:
The `<VNET_RESOURCE_ID>` value is the resource ID for the virtual network, which is in the format: `/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCER_GROUP>/providers/Microsoft.Network/virtualNetworks/<VNET_NAME>`. You can use this command to get a list of virtual network IDs, filtered by `<RESOURCE_GROUP>`: `az network vnet list --resource-group <RESOURCE_GROUP> --output tsv --query "[]".id`.
246
+
247
+
### [Azure portal](#tab/azure-portal)
248
+
249
+
Use these steps to create your function app with virtual network integration and related Azure resources.
6. In the **Networking** tab, set **Enable public access** to **Off** and **Enable network injection** to **On**.
254
+
255
+
7. For **Virtual network**, select or create a virtual network that is in the same region as your app.
256
+
257
+
8. Set **Enable VNet integration** to **On** and select or create a subnet.
258
+
259
+
6. Select **Review + create** to review the app configuration you chose, and then select **Create** to provision and deploy the function app with virtual networking.
260
+
261
+
7. Select the **Notifications** icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
262
+
263
+
8. Select **Go to resource** to view your new function app. You can also select **Pin to dashboard**. Pinning makes it easier to return to this function app resource from your dashboard.
264
+
265
+
### [Visual Studio Code](#tab/vs-code)
266
+
267
+
You can't currently enable virtual networking when you use Visual Studio Code to create your app.
268
+
269
+
---
270
+
271
+
For end-to-end examples of how to create apps in Flex Consumption with virtual network integration see these resources:
272
+
273
+
+ [Flex Consumption: HTTP to Event Hubs using VNET Integration](https://github.com/Azure/azure-functions-flex-consumption/blob/main/samples/E2E/HTTP-VNET-EH/README.md)
274
+
+ [Flex Consumption: triggered from Service Bus using VNET Integration](https://github.com/Azure/azure-functions-flex-consumption/blob/main/samples/E2E/SB-VNET/README.md)
275
+
276
+
To modify or delete virtual network integration in an existing app:
277
+
278
+
### [Azure CLI](#tab/azure-cli)
279
+
280
+
Use the [`az functionapp vnet-integration add`](/cli/azure/functionapp/vnet-integration#az-functionapp-vnet-integration-add) command to enable virtual network integration to an existing function app:
Use the [`az functionapp vnet-integration remove`](/cli/azure/functionapp/vnet-integration#az-functionapp-vnet-integration-remove) command to disable virtual network integration in your app:
287
+
288
+
```azurecli
289
+
az functionapp vnet-integration remove --resource-group <RESOURCE_GROUP> --name <APP_NAME>
290
+
```
291
+
292
+
Use the [`az functionapp vnet-integration list`](/cli/azure/functionapp/vnet-integration#az-functionapp-vnet-integration-list) command to list the current virtual network integrations for your app:
293
+
294
+
```azurecli
295
+
az functionapp vnet-integration list --resource-group <RESOURCE_GROUP> --name <APP_NAME>
296
+
```
297
+
298
+
### [Azure portal](#tab/azure-portal)
299
+
300
+
You can integrate your existing app with an existing virtual network and subnet in the portal.
301
+
302
+
1. In your function app page in the [Azure portal](https://portal.azure.com), expand **Settings** in the left menu and select **Networking**.
303
+
304
+
1. Under **Outbound traffic configuration**, select **Not configured**.
305
+
306
+
1. In the **Virtual Network Integration** page, select **Add virtual network integration**.
307
+
308
+
1. Select an existing **Virtual network** and **Subnet** and select **Connect**.
309
+
310
+
### [Visual Studio Code](#tab/vs-code)
311
+
312
+
You can't currently configure virtual networking in Visual Studio Code.
313
+
314
+
---
315
+
316
+
When choosing a subnet, these considerations apply:
317
+
318
+
+ The subnet you choose can't already be used for other purposes, such as with private endpoints or service endpoints, or be delegated to any other hosting plan or service.
319
+
+ You can share the same subnet with more than one app running in a Flex Consumptionk plan. Because the networking resources are shared across all apps, one function app might impact the performance of others on the same subnet.
320
+
+ In a Flex Consumption plan, a single function app might use up to 40 IP addresses, even when the app scales beyond 40 instances. While this rule of thumb is helpful when estimating the subnet size you need, it's not strictly enforced.
321
+
219
322
## Configure the deployment storage account
220
323
221
324
In the Flex Consumption plan, the deployment package that contains your app's code is maintained in a blob storage container. By default, deployments use the same storage account and connection string (`AzureWebJobsStorage`) used by the Functions runtime to maintain your app. However, you can instead designate a blob container in a separate storage account as the deployment source for your code.
@@ -245,8 +348,6 @@ This example creates a function app in the Flex Consumption plan with a separate
You can also modify the deployment storage configuration used to deploy to an existing app.
249
-
250
351
### [Azure portal](#tab/azure-portal)
251
352
252
353
You can't currently configure deployment storage when creating your app in the Azure portal. To configure deployment storage during app creation, instead use the Azure CLI to create your app.
@@ -259,9 +360,11 @@ You can't currently configure deployment storage when creating your app in Azure
259
360
260
361
---
261
362
363
+
You can also modify the deployment storage configuration for an existing app.
364
+
262
365
### [Azure CLI](#tab/azure-cli)
263
366
264
-
You can also use the [`az functionapp deployment config set`](/cli/azure/functionapp/deployment/config#az-functionapp-deployment-config-set) command to modify the deployment storage configuration:
367
+
Use the [`az functionapp deployment config set`](/cli/azure/functionapp/deployment/config#az-functionapp-deployment-config-set) command to modify the deployment storage configuration:
265
368
266
369
```azurecli
267
370
az functionapp deployment config set --resource-grpoup <RESOURCE_GROUP> --name <APP_NAME> --deployment-storage-name <DEPLOYMENT_ACCCOUNT_NAME> --deployment-storage-container-name <DEPLOYMENT_CONTAINER_NAME>
@@ -315,7 +418,7 @@ At any point, you can change the instance memory size setting used by your app.
315
418
This example uses the [`az functionapp scale config set`](/cli/azure/functionapp/scale/config#az-functionapp-scale-config-set) command to change the instance memory size setting to 512 MB:
316
419
317
420
```azurecli
318
-
az functionapp scale config set -g <resourceGroup> --name <APP_NAME> --instance-memory 512
421
+
az functionapp scale config set --resource-group <resourceGroup> --name <APP_NAME> --instance-memory 512
0 commit comments