From 1a7cdc67287017d037491672d5d19411125f9ebe Mon Sep 17 00:00:00 2001 From: Patrick Leung Date: Mon, 24 Mar 2025 12:01:24 +0000 Subject: [PATCH 1/3] Add ARM template example for setting app settings in Azure App Service --- articles/app-service/configure-common.md | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/articles/app-service/configure-common.md b/articles/app-service/configure-common.md index 0053f71f63e7b..0dab9419ae45a 100644 --- a/articles/app-service/configure-common.md +++ b/articles/app-service/configure-common.md @@ -126,6 +126,44 @@ To make one or more app settings slot specific, use [Set-AzWebAppSlotConfigName] Set-AzWebAppSlotConfigName -ResourceGroupName -Name -AppSettingNames ,,... ``` +# [ARM Template](#tab/ARM) + +Set one or more app settings by using Azure Resource Manager templates (ARM templates): + +```json + { + "type": "Microsoft.Web/sites", + "apiVersion": "2024-04-01", + "name": "[parameters('webAppName')]", + "location": "[parameters('location')]", + "properties": { + "httpsOnly": true, + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]", + "siteConfig": { + "linuxFxVersion": "[parameters('linuxFxVersion')]", + "minTlsVersion": "1.2", + "ftpsState": "FtpsOnly", + "appSettings": [ + { + "name": "", + "value": "" + }, + { + "name": "", + "value": "" + } + ] + } + }, + "identity": { + "type": "SystemAssigned" + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]" + ] + }, +``` + ----- ### Edit app settings in bulk From 0d8d51835efe0870d68cb7b13555eb4a9b06930e Mon Sep 17 00:00:00 2001 From: Patrick Leung Date: Mon, 24 Mar 2025 12:09:30 +0000 Subject: [PATCH 2/3] Add ARM template example for setting multiple app settings in Azure App Service --- articles/app-service/configure-common.md | 42 +++++++++++++++++++++--- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/articles/app-service/configure-common.md b/articles/app-service/configure-common.md index 0dab9419ae45a..4b6e1d48239d7 100644 --- a/articles/app-service/configure-common.md +++ b/articles/app-service/configure-common.md @@ -147,10 +147,6 @@ Set one or more app settings by using Azure Resource Manager templates (ARM temp { "name": "", "value": "" - }, - { - "name": "", - "value": "" } ] } @@ -238,6 +234,44 @@ az webapp config appsettings set --resource-group --name It's not possible to edit app settings in bulk by using a JSON file with Azure PowerShell. +# [ARM Template](#tab/ARM) + +Set one or more app settings by using Azure Resource Manager templates (ARM templates): + +```json + { + "type": "Microsoft.Web/sites", + "apiVersion": "2024-04-01", + "name": "[parameters('webAppName')]", + "location": "[parameters('location')]", + "properties": { + "httpsOnly": true, + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]", + "siteConfig": { + "linuxFxVersion": "[parameters('linuxFxVersion')]", + "minTlsVersion": "1.2", + "ftpsState": "FtpsOnly", + "appSettings": [ + { + "name": "", + "value": "" + }, + { + "name": "", + "value": "" + } + ] + } + }, + "identity": { + "type": "SystemAssigned" + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]" + ] + }, +``` + ----- ## Configure connection strings From 58d59d9a51dbe995a71eff6e40af73eba6241b7e Mon Sep 17 00:00:00 2001 From: Patrick Leung Date: Mon, 24 Mar 2025 13:52:27 +0000 Subject: [PATCH 3/3] Add reference to Microsoft.Web/sites for more information on app settings in ARM templates --- articles/app-service/configure-common.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/articles/app-service/configure-common.md b/articles/app-service/configure-common.md index 4b6e1d48239d7..1b3f38876befb 100644 --- a/articles/app-service/configure-common.md +++ b/articles/app-service/configure-common.md @@ -160,6 +160,8 @@ Set one or more app settings by using Azure Resource Manager templates (ARM temp }, ``` +Please refer to [**Microsoft.Web/sites**](/azure/templates/microsoft.web/sites) for more information. + ----- ### Edit app settings in bulk @@ -272,6 +274,8 @@ Set one or more app settings by using Azure Resource Manager templates (ARM temp }, ``` +Please refer to [**Microsoft.Web/sites**](/azure/templates/microsoft.web/sites) for more information. + ----- ## Configure connection strings