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/flex-consumption-how-to.md
+31-22Lines changed: 31 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Create and manage function apps in a Flex Consumption plan
3
3
description: "Learn how to create function apps hosted in the Flex Consumption plan in Azure Functions and how to modify specific settings for an existing function app."
4
-
ms.date: 05/12/2024
4
+
ms.date: 05/21/2024
5
5
ms.topic: how-to
6
6
ms.custom:
7
7
- build-2024
@@ -58,7 +58,7 @@ Function app resources are langauge-specific. Make sure to choose your preferred
58
58
59
59
## Create a Flex Consumption app
60
60
61
-
This section shows you how to create a function app in the Flex Consumption plan by using either the Azure CLI, Azure portal, or Visual Studio Code. For an example of creating an app in a Flex Consumption plan using Bicep/ARM templates, see the [Flex Consumption repository](https://github.com/Azure/azure-functions-flex-consumption/blob/main/samples/README.md#iac-samples-overview).
61
+
This section shows you how to create a function app in the Flex Consumption plan by using either the Azure CLI, Azure portal, or Visual Studio Code. For an example of creating an app in a Flex Consumption plan using Bicep/ARM templates, see the [Flex Consumption repository](https://github.com/Azure-Samples/azure-functions-flex-consumption-samples/blob/main/README.md#iac-samples-overview).
62
62
::: zone pivot="programming-language-java"
63
63
You can skip this section if you choose to instead [create and deploy your app using Maven](#create-and-deploy-your-app-using-maven).
64
64
::: zone-end
@@ -171,7 +171,6 @@ You can choose to deploy your project code to an existing function app using var
@@ -271,8 +270,8 @@ You can't currently enable virtual networking when you use Visual Studio Code to
271
270
272
271
For end-to-end examples of how to create apps in Flex Consumption with virtual network integration see these resources:
273
272
274
-
+ [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)
275
-
+ [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)
273
+
+ [Flex Consumption: HTTP to Event Hubs using VNET Integration](https://github.com/Azure-Samples/azure-functions-flex-consumption-samples/blob/main/E2E/HTTP-VNET-EH/README.md)
274
+
+ [Flex Consumption: triggered from Service Bus using VNET Integration](https://github.com/Azure-Samples/azure-functions-flex-consumption-samples/blob/main/E2E/SB-VNET/README.md)
276
275
277
276
To modify or delete virtual network integration in an existing app:
278
277
@@ -320,33 +319,39 @@ When choosing a subnet, these considerations apply:
320
319
+ You can share the same subnet with more than one app running in a Flex Consumption plan. Because the networking resources are shared across all apps, one function app might impact the performance of others on the same subnet.
321
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.
322
321
323
-
## Configure the deployment storage account
322
+
## Configure deployment settings
324
323
325
-
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.
324
+
In the Flex Consumption plan, the deployment package that contains your app's code is maintained in an Azure Blob Storage container. By default, deployments use the same storage account (`AzureWebJobsStorage`) and connection string value used by the Functions runtime to maintain your app. The connection string is stored in the `DEPLOYMENT_STORAGE_CONNECTION_STRING` application setting. However, you can instead designate a blob container in a separate storage account as the deployment source for your code. You can also change the authentication method used to access the container.
326
325
327
-
A custom deployment storage account must meet these conditions:
326
+
A customized deployment source should meet this criteria:
328
327
329
328
+ The storage account must already exist.
330
-
+ The container to use for deployments must also exist and be empty.
331
-
+ An application setting that contains the connection string for the deployment storage account must already exist.
329
+
+ The container to use for deployments must also exist.
330
+
+ When more than one app uses the same storage account, each should have its own deployment container. Using a unique container for each app prevents the deployment packages from being overwritten, which would happen if apps shared the same container.
331
+
332
+
When configuring deployment storage authentication, keep these considerations in mind:
333
+
334
+
+ When you use a connection string to connect to the deployment storage account, the application setting that contains the connection string must already exist.
335
+
+ When you use a user-assigned managed identity, the provided identity gets linked to the function app. The `Storage Blob Data Contributor` role scoped to the deployment storage account also gets assigned to the identity.
336
+
+ When you use a system-assigned managed identity, an identity gets created when a valid system-assigned identity doesn't already exist in your app. When a system-assigned identity does exists, the `Storage Blob Data Contributor` role scoped to the deployment storage account also gets assigned to the identity.
332
337
333
-
To configure the deployment storage account when you create your function app in the Flex Consumption plan:
338
+
To configure deployment settings when you create your function app in the Flex Consumption plan:
334
339
335
340
### [Azure CLI](#tab/azure-cli)
336
341
337
342
Use the [`az functionapp create`] command and supply these additional options that customize deployment storage:
338
343
339
344
| Parameter | Description |
340
345
|--|--|--|
341
-
|`--deployment-storage-name`| The storage account name to use for your deployment package. |
342
-
|`--deployment-storage-container-name`| The name of the container in the account that contains the deployment package. |
343
-
|`--deployment-storage-auth-type`| The authentication type to use for connecting to the deployment storage account. Currently, only `storageAccountConnectionString` is supported. |
344
-
|`--deployment-storage-auth-value`| When using `storageAccountConnectionString`, this parameter is set to the name of the application setting that contains the storage account connection string used for deployment. |
346
+
|`--deployment-storage-name`| The name of the deployment storage account. |
347
+
|`--deployment-storage-container-name`| The name of the container in the account to contain your app's deployment package. |
348
+
|`--deployment-storage-auth-type`| The authentication type to use for connecting to the deployment storage account. Accepted values include `StorageAccountConnectionString`, `UserAssignedIdentity`, and `SystemAssignedIdentity`. |
349
+
|`--deployment-storage-auth-value`| When using `StorageAccountConnectionString`, this parameter is set to the name of the application setting that contains the connection string to the deployment storage account. When using `UserAssignedIdentity`, this parameter is set to the name of the resource ID of the identity you want to use. |
345
350
346
-
This example creates a function app in the Flex Consumption plan with a separate deployment storage account:
351
+
This example creates a function app in the Flex Consumption plan with a separate deployment storage account and user assigned identity:
@@ -368,16 +373,20 @@ You can also modify the deployment storage configuration for an existing app.
368
373
Use the [`az functionapp deployment config set`](/cli/azure/functionapp/deployment/config#az-functionapp-deployment-config-set) command to modify the deployment storage configuration:
369
374
370
375
```azurecli
371
-
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>
376
+
az functionapp deployment config set --resource-group <RESOURCE_GROUP> --name <APP_NAME> --deployment-storage-name <DEPLOYMENT_ACCCOUNT_NAME> --deployment-storage-container-name <DEPLOYMENT_CONTAINER_NAME>
372
377
```
373
378
374
379
### [Azure portal](#tab/azure-portal)
375
380
376
381
1. In your function app page in the [Azure portal](https://portal.azure.com), expand **Settings** in the left menu and select **Deployment settings**.
377
382
378
-
1. Select an existing **Storage account** and then select an existing empty container in the account.
383
+
1. Under Application package location, select an existing **Storage account** and then select an existing empty **container** in the account.
384
+
385
+
1. Under Storage authentication, select your preferred authentication type
386
+
387
+
+ If you selected **Connection string**, select the name of the app setting that contains the connection string for the deployment storage account.
379
388
380
-
1. Select the **App setting name** for the setting that contains the connection string for the deployment storage account.
389
+
+ If you selected **User assigned identity**, select the identity you would like to use.
381
390
382
391
1. Select **Save** to update the app.
383
392
@@ -437,7 +446,7 @@ You can't currently change the instance memory size setting for your app using V
437
446
438
447
## Set always ready instance counts
439
448
440
-
When creating an app in a Flex Consumption plan, you can set the always ready instance count for specific groups (HTTP or Durable triggers) and triggers.
449
+
When creating an app in a Flex Consumption plan, you can set the always ready instance count for specific groups (HTTP or Durable triggers) and triggers. For individual functions, use the format `function:<FUNCTION_NAME>=n`.
This example sets the always ready instance count for all Durable trigger functions to `3` and sets the always ready instance count to `2` for a service bus triggered function named `function5`:
Copy file name to clipboardExpand all lines: articles/azure-functions/flex-consumption-plan.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,9 +80,9 @@ Concurrency refers to the number of parallel executions of a function on an inst
80
80
81
81
Concurrency has a direct effect on how your app scales because at lower concurrency levels, you need more instances to handle the event-driven demand for a function. While you can control and fine tune the concurrency, we provide defaults that work for most cases. To learn how to set concurrency limits for HTTP trigger functions, see [Set HTTP concurrency limits](flex-consumption-how-to.md#set-http-concurrency-limits).
82
82
83
-
## Deployment storage account
83
+
## Deployment
84
84
85
-
Unlike other plans, project code is deployed to apps in a Flex Consumption plan from a container in a Blob storage account. By default, the same storage account used to store internal host metadata (AzureWebJobsStorage) is also used as the deployment container. However, you can define a second storage account in which to maintain the deployment container. For more information, see [Configure the deployment storage account](flex-consumption-how-to.md#configure-the-deployment-storage-account).
85
+
Deployments in the Flex Consumption plan follow a single path. After your project code is built and zipped into an application package, it is deployed to a blob storage container. Upon startup, your app will retrieve the package and run from it. By default, the same storage account used to store internal host metadata (AzureWebJobsStorage) is also used as the deployment container. However, you can use an alternative storage account or choose your preferred authentication method by [configuring your app's deployment settings](flex-consumption-how-to.md#configure-deployment-settings). In streamlining the deployment path, there is no longer the need for app settings to influence deployment behaviour.
Copy file name to clipboardExpand all lines: articles/azure-functions/functions-app-settings.md
+31-20Lines changed: 31 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -774,7 +774,7 @@ Indicates whether all outbound traffic from the app is routed through the virtua
774
774
775
775
## WEBSITES_ENABLE_APP_SERVICE_STORAGE
776
776
777
-
Indicates whether the `/home` directory is shared across scaled instances, with a default value of `true`. You should set this to `false` when deploying your function app in a container. d
777
+
Indicates whether the `/home` directory is shared across scaled instances, with a default value of `true`. You should set this to `false` when deploying your function app in a container.
778
778
779
779
## App Service site settings
780
780
@@ -821,7 +821,7 @@ Sets the specific version of PowerShell on which your functions run. For more in
821
821
822
822
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.
823
823
824
-
### vnetrouteallenabled
824
+
### vnetRouteAllEnabled
825
825
826
826
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).
827
827
@@ -831,30 +831,41 @@ This site setting replaces the legacy [WEBSITE\_VNET\_ROUTE\_ALL](#website_vnet_
831
831
832
832
In the [Flex Consumption plan](./flex-consumption-plan.md), these site properties and application settings are deprecated and shouldn't be used when creating function app resources:
833
833
834
-
|Property/setting| Reason |
834
+
|Setting/property| Reason |
835
835
| ----- | ----- |
836
-
|`properties.ftpsState`| FTPS not supported |
837
-
|`properties.use32BitWorkerProcess`|32-bit not supported |
838
-
|`properties.isReserved`|Not valid|
839
-
|`properties.IsXenon`|Not valid|
840
-
|`properties.windowsFxVersion`|Not valid|
841
-
|`properties.alwaysOn`|Not valid|
842
-
|`properties.siteConfig.preWarmedInstanceCount`| Renamed as `alwaysReadyInstances`|
843
-
|`properties.siteConfig.functionAppScaleLimit`|Renamed as `maximumInstanceCount`|
844
-
|`properties.containerSize`|Renamed as `instanceMemoryMB`|
845
-
|`properties.javaVersion`| Replaced by `version` in `properties.functionAppConfig.runtime`|
846
-
|`properties.powerShellVersion`|Replaced by `version` in `properties.functionAppConfig.runtime`|
847
-
|`properties.netFrameworkVersion`|Replaced by `version` in `properties.functionAppConfig.runtime`|
848
-
|`properties.LinuxFxVersion`|Replaced by `properties.functionAppConfig.runtime`|
849
-
|`WEBSITE_NODE_DEFAULT_VERSION`|Replaced by `version` in `properties.functionAppConfig.runtime`|
836
+
|`ENABLE_ORYX_BUILD`|Replaced by the `remoteBuild` parameter when deploying in Flex Consumption|
850
837
|`FUNCTIONS_EXTENSION_VERSION`|App Setting is set by the backend. A value of ~1 can be ignored. |
851
838
|`FUNCTIONS_WORKER_RUNTIME`|Replaced by `name` in `properties.functionAppConfig.runtime`|
852
839
|`FUNCTIONS_WORKER_RUNTIME_VERSION`|Replaced by `version` in `properties.functionAppConfig.runtime`|
853
-
|`FUNCTIONS_MAX_HTTP_CONCURRENCY`|App Setting replaced by scale and concurrency's trigger section|
840
+
|`FUNCTIONS_MAX_HTTP_CONCURRENCY`|Replaced by scale and concurrency's trigger section|
854
841
|`FUNCTIONS_WORKER_PROCESS_COUNT`|Setting not valid|
855
842
|`FUNCTIONS_WORKER_DYNAMIC_CONCURRENCY_ENABLED`|Setting not valid|
856
-
|`WEBSITE_CONTENTAZUREFILECONNECTIONSTRING`|App Setting replaced by functionAppConfig's deployment section|
857
-
|`WEBSITE_CONTENTSHARE`|App Setting replaced by functionAppConfig's deployment section|
843
+
|`SCM_DO_BUILD_DURING_DEPLOYMENT`|Replaced by the `remoteBuild` parameter when deploying in Flex Consumption|
844
+
|`WEBSITE_CONTENTAZUREFILECONNECTIONSTRING`|Replaced by functionAppConfig's deployment section|
845
+
|`WEBSITE_CONTENTOVERVNET`|Not used for networking in Flex Consumption|
846
+
|`WEBSITE_CONTENTSHARE`|Replaced by functionAppConfig's deployment section|
847
+
|`WEBSITE_DNS_SERVER`|DNS is inherited from the integrated VNet in Flex|
848
+
|`WEBSITE_NODE_DEFAULT_VERSION`|Replaced by `version` in `properties.functionAppConfig.runtime`|
849
+
|`WEBSITE_RUN_FROM_PACKAGE`|Not used for deployments in Flex Consumption|
850
+
|`WEBSITE_SKIP_CONTENTSHARE_VALIDATION`|Content share is not used in Flex Consumption|
851
+
|`WEBSITE_VNET_ROUTE_ALL`|Not used for networking in Flex Consumption|
852
+
|`properties.alwaysOn`|Not valid|
853
+
|`properties.containerSize`|Renamed as `instanceMemoryMB`|
854
+
|`properties.ftpsState`| FTPS not supported |
855
+
|`properties.isReserved`|Not valid|
856
+
|`properties.IsXenon`|Not valid|
857
+
|`properties.javaVersion`| Replaced by `version` in `properties.functionAppConfig.runtime`|
858
+
|`properties.LinuxFxVersion`|Replaced by `properties.functionAppConfig.runtime`|
859
+
|`properties.netFrameworkVersion`|Replaced by `version` in `properties.functionAppConfig.runtime`|
860
+
|`properties.powerShellVersion`|Replaced by `version` in `properties.functionAppConfig.runtime`|
861
+
|`properties.siteConfig.functionAppScaleLimit`|Renamed as `maximumInstanceCount`|
862
+
|`properties.siteConfig.preWarmedInstanceCount`| Renamed as `alwaysReadyInstances`|
863
+
|`properties.use32BitWorkerProcess`|32-bit not supported |
864
+
|`properties.vnetBackupRestoreEnabled`|Not used for networking in Flex Consumption|
865
+
|`properties.vnetContentShareEnabled`|Not used for networking in Flex Consumption|
866
+
|`properties.vnetImagePullEnabled`|Not used for networking in Flex Consumptionlid|
867
+
|`properties.vnetRouteAllEnabled`|Not used for networking in Flex Consumption|
0 commit comments