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/functions-app-settings.md
+54-4Lines changed: 54 additions & 4 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: App settings reference for Azure Functions
3
3
description: Reference documentation for the Azure Functions app settings or environment variables.
4
4
ms.topic: conceptual
5
-
ms.date: 04/27/2022
5
+
ms.date: 10/04/2022
6
6
---
7
7
8
8
# App settings reference for Azure Functions
@@ -265,7 +265,16 @@ The version of the Functions runtime that hosts your function app. A tilde (`~`)
265
265
266
266
|Key|Sample value|
267
267
|---|------------|
268
-
|FUNCTIONS\_EXTENSION\_VERSION|`~3`|
268
+
|FUNCTIONS\_EXTENSION\_VERSION|`~4`|
269
+
270
+
The following major runtime version values are supported:
271
+
272
+
| Value | Runtime target | Comment |
273
+
| ------ | -------- | --- |
274
+
|`~4`| 4.x | Recommended |
275
+
|`~3`| 3.x | Support ends December 13, 2022 |
276
+
|`~2`| 2.x | No longer supported |
277
+
|`~1`| 1.x | Supported |
269
278
270
279
## FUNCTIONS\_V2\_COMPATIBILITY\_MODE
271
280
@@ -274,7 +283,7 @@ This setting enables your function app to run in a version 2.x compatible mode o
274
283
>[!IMPORTANT]
275
284
> This setting is intended only as a short-term workaround while you update your app to run correctly on version 3.x. This setting is supported as long as the [2.x runtime is supported](functions-versions.md). If you encounter issues that prevent your app from running on version 3.x without using this setting, please [report your issue](https://github.com/Azure/azure-functions-host/issues/new?template=Bug_report.md).
276
285
277
-
Requires that [FUNCTIONS\_EXTENSION\_VERSION](functions-app-settings.md#functions_extension_version) be set to `~3`.
286
+
Requires that [FUNCTIONS\_EXTENSION\_VERSION](#functions_extension_version) be set to `~3`.
278
287
279
288
|Key|Sample value|
280
289
|---|------------|
@@ -368,7 +377,7 @@ To learn more, see [`pip` documentation for `--index-url`](https://pip.pypa.io/e
368
377
369
378
## PIP\_EXTRA\_INDEX\_URL
370
379
371
-
The value for this setting indicates a extra index URL for custom packages for Python apps, to use in addition to the `--index-url`. Use this setting when you need to run a remote build using custom dependencies that are found in an extra package index. Should follow the same rules as --index-url.
380
+
The value for this setting indicates an extra index URL for custom packages for Python apps, to use in addition to the `--index-url`. Use this setting when you need to run a remote build using custom dependencies that are found in an extra package index. Should follow the same rules as --index-url.
372
381
373
382
|Key|Sample value|
374
383
|---|------------|
@@ -557,6 +566,47 @@ Indicates whether all outbound traffic from the app is routed through the virtua
557
566
|---|------------|
558
567
|WEBSITE\_VNET\_ROUTE\_ALL|`1`|
559
568
569
+
## App Service site settings
570
+
571
+
Some configurations must be maintained at the App Service level as site settings, such as language versions. These settings are usually set in the portal, by using REST APIs, or by using Azure CLI or Azure PowerShell. The following are site settings that could be required, depending on your runtime language, OS, and versions:
572
+
573
+
### linuxFxVersion
574
+
575
+
For function apps running on Linux, `linuxFxVersion` indicates the language and version for the language-specific worker process. This information is used, along with [`FUNCTIONS_EXTENSION_VERSION`](#functions_extension_version), to determine which specific Linux container image is installed to run your function app. This setting can be set to a pre-defined value or a custom image URI.
576
+
577
+
This value is set for you when you create your Linux function app. You may need to set it for ARM template and Bicep deployments and in certain upgrade scenarios.
578
+
579
+
#### Valid linuxFxVersion values
580
+
581
+
You can use the following Azure CLI command to see a table of current `linuxFxVersion` values, by supported Functions runtime version:
582
+
583
+
```azurecli-interactive
584
+
az functionapp list-runtimes --os linux --query "[].{stack:join(' ', [runtime, version]), LinuxFxVersion:linux_fx_version, SupportedFunctionsVersions:to_string(supported_functions_versions[])}" --output table
585
+
```
586
+
587
+
The previous command requires you to upgrade to version 2.40 of the Azure CLI.
588
+
589
+
#### Custom images
590
+
591
+
When you create and maintain your own custom linux container for your function app, the `linuxFxVersion` value is also in the format `DOCKER|<IMAGE_URI>`, as in the following example:
Sets the specific version of .NET for C# functions. For more information, see [Migrating from 3.x to 4.x](functions-versions.md#migrating-from-3x-to-4x).
603
+
604
+
### powerShellVersion
605
+
606
+
Sets the specific version of PowerShell on which your functions run. For more information, see [Changing the PowerShell version](functions-reference-powershell.md#changing-the-powershell-version).
607
+
608
+
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.
609
+
560
610
## Next steps
561
611
562
612
[Learn how to update app settings](functions-how-to-use-azure-function-app-settings.md#settings)
After you see the `HttpExample` endpoint appear in the output, navigate to `http://localhost:7071/api/HttpExample?name=Functions`. The browser must display a "hello" message that echoes back `Functions`, the value supplied to the `name` query parameter.
294
+
After you see the `HttpExample` endpoint written to the output, navigate to `http://localhost:7071/api/HttpExample?name=Functions`. The browser must display a "hello" message that echoes back `Functions`, the value supplied to the `name` query parameter.
293
295
294
296
Press **Ctrl**+**C** to stop the host.
295
297
@@ -349,13 +351,13 @@ After verifying the function app in the container, press **Ctrl**+**C** to stop
349
351
350
352
Docker Hub is a container registry that hosts images and provides image and container services. To share your image, which includes deploying to Azure, you must push it to a registry.
351
353
352
-
1. If you haven't already signed in to Docker, do so with the [docker login](https://docs.docker.com/engine/reference/commandline/login/) command, replacing `<docker_id>` with your Docker Hub account ID. This command prompts you for your username and password. A "Login Succeeded" message confirms that you're signed in.
354
+
1. If you haven't already signed in to Docker, do so with the [`docker login`](https://docs.docker.com/engine/reference/commandline/login/) command, replacing `<docker_id>` with your Docker Hub account ID. This command prompts you for your username and password. A "sign in Succeeded" message confirms that you're signed in.
353
355
354
356
```console
355
357
docker login
356
358
```
357
359
358
-
1. After you've signed in, push the image to Docker Hub by using the [docker push](https://docs.docker.com/engine/reference/commandline/push/) command, again replace the `<docker_id>` with your Docker Hub account ID.
360
+
1. After you've signed in, push the image to Docker Hub by using the [`docker push`](https://docs.docker.com/engine/reference/commandline/push/) command, again replace the `<docker_id>` with your Docker Hub account ID.
@@ -380,7 +382,7 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
380
382
az login
381
383
```
382
384
383
-
The [az login](/cli/azure/reference-index#az-login) command signs you into your Azure account.
385
+
The [`az login`](/cli/azure/reference-index#az-login) command signs you into your Azure account.
384
386
385
387
# [Azure PowerShell](#tab/azure-powershell)
386
388
```azurepowershell
@@ -399,15 +401,15 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
399
401
az group create --name AzureFunctionsContainers-rg --location <REGION>
400
402
```
401
403
402
-
The [az group create](/cli/azure/group#az-group-create) command creates a resource group. In the above command, replace `<REGION>` with a region near you, using an available region code returned from the [az account list-locations](/cli/azure/account#az-account-list-locations) command.
404
+
The [`az group create`](/cli/azure/group#az-group-create) command creates a resource group. In the above command, replace `<REGION>` with a region near you, using an available region code returned from the [az account list-locations](/cli/azure/account#az-account-list-locations) command.
The [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) command creates a resource group. You generally create your resource group and resources in a region near you, using an available region returned from the [Get-AzLocation](/powershell/module/az.resources/get-azlocation) cmdlet.
412
+
The [`New-AzResourceGroup`](/powershell/module/az.resources/new-azresourcegroup) command creates a resource group. You generally create your resource group and resources in a region near you, using an available region returned from the [`Get-AzLocation`](/powershell/module/az.resources/get-azlocation) cmdlet.
411
413
412
414
---
413
415
@@ -419,15 +421,15 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
The [New-AzStorageAccount](/powershell/module/az.storage/new-azstorageaccount) cmdlet creates the storage account.
432
+
The [`New-AzStorageAccount`](/powershell/module/az.storage/new-azstorageaccount) cmdlet creates the storage account.
431
433
432
434
---
433
435
@@ -446,7 +448,7 @@ Use the following commands to create these items. Both Azure CLI and PowerShell
446
448
---
447
449
We use the Premium plan here, which can scale as needed. For more information about hosting, see [Azure Functions hosting plans comparison](functions-scale.md). For more information on how to calculate costs, see the [Functions pricing page](https://azure.microsoft.com/pricing/details/functions/).
448
450
449
-
The command also provisions an associated Azure Application Insights instance in the same resource group, with which you can monitor your function app and view logs. For more information, see [Monitor Azure Functions](functions-monitoring.md). The instance incurs no costs until you activate it.
451
+
The command also creates an associated Azure Application Insights instance in the same resource group, with which you can monitor your function app and view logs. For more information, see [Monitor Azure Functions](functions-monitoring.md). The instance incurs no costs until you activate it.
450
452
451
453
## Create and configure a function app on Azure with the image
452
454
@@ -459,7 +461,7 @@ A function app on Azure manages the execution of your functions in your hosting
In the [az functionapp create](/cli/azure/functionapp#az-functionapp-create) command, the *deployment-container-image-name* parameter specifies the image to use for the function app. You can use the [az functionapp config container show](/cli/azure/functionapp/config/container#az-functionapp-config-container-show) command to view information about the image used for deployment. You can also use the [az functionapp config container set](/cli/azure/functionapp/config/container#az-functionapp-config-container-set) command to deploy from a different image.
464
+
In the [`az functionapp create`](/cli/azure/functionapp#az-functionapp-create) command, the *deployment-container-image-name* parameter specifies the image to use for the function app. You can use the [az functionapp config container show](/cli/azure/functionapp/config/container#az-functionapp-config-container-show) command to view information about the image used for deployment. You can also use the [`az functionapp config container set`](/cli/azure/functionapp/config/container#az-functionapp-config-container-set) command to deploy from a different image.
463
465
464
466
> [!NOTE]
465
467
> If you're using a custom container registry, then the *deployment-container-image-name* parameter will refer to the registry URL.
@@ -482,7 +484,7 @@ A function app on Azure manages the execution of your functions in your hosting
The connection string for the storage account is returned by using the [az storage account show-connection-string](/cli/azure/storage/account) command.
487
+
The connection string for the storage account is returned by using the [`az storage account show-connection-string`](/cli/azure/storage/account) command.
486
488
487
489
# [Azure PowerShell](#tab/azure-powershell)
488
490
```azurepowershell
@@ -491,7 +493,7 @@ A function app on Azure manages the execution of your functions in your hosting
The key returned by the [Get-AzStorageAccountKey](/powershell/module/az.storage/get-azstorageaccountkey) cmdlet is used to construct the connection string for the storage account.
496
+
The key returned by the [`Get-AzStorageAccountKey`](/powershell/module/az.storage/get-azstorageaccountkey) cmdlet is used to construct the connection string for the storage account.
495
497
496
498
---
497
499
@@ -503,13 +505,13 @@ A function app on Azure manages the execution of your functions in your hosting
503
505
```azurecli
504
506
az functionapp config appsettings set --name <APP_NAME> --resource-group AzureFunctionsContainers-rg --settings AzureWebJobsStorage=<CONNECTION_STRING>
505
507
```
506
-
The [az functionapp config appsettings set](/cli/azure/functionapp/config/appsettings#az-functionapp-config-ppsettings-set) command creates the setting.
508
+
The [`az functionapp config appsettings set`](/cli/azure/functionapp/config/appsettings#az-functionapp-config-ppsettings-set) command creates the setting.
The [az functionapp deployment container config](/cli/azure/functionapp/deployment/container#az-functionapp-deployment-container-config) command enables continuous deployment and returns the deployment webhook URL. You can retrieve this URL at any later time by using the [az functionapp deployment container show-cd-url](/cli/azure/functionapp/deployment/container#az-functionapp-deployment-container-show-cd-url) command.
555
+
The [`az functionapp deployment container config`](/cli/azure/functionapp/deployment/container#az-functionapp-deployment-container-config) command enables continuous deployment and returns the deployment webhook URL. You can retrieve this URL at any later time by using the [`az functionapp deployment container show-cd-url`](/cli/azure/functionapp/deployment/container#az-functionapp-deployment-container-show-cd-url) command.
The `DOCKER_ENABLE_CI` application setting controls whether continuous deployment is enabled from the container repository. The [Get-AzWebAppContainerContinuousDeploymentUrl](/powershell/module/az.websites/get-azwebappcontainercontinuousdeploymenturl) cmdlet returns the URL of the deployment webhook.
563
+
The `DOCKER_ENABLE_CI` application setting controls whether continuous deployment is enabled from the container repository. The [`Get-AzWebAppContainerContinuousDeploymentUrl`](/powershell/module/az.websites/get-azwebappcontainercontinuousdeploymenturl) cmdlet returns the URL of the deployment webhook.
0 commit comments