diff --git a/articles/app-service/configure-common.md b/articles/app-service/configure-common.md index 0053f71f63e7b..1b3f38876befb 100644 --- a/articles/app-service/configure-common.md +++ b/articles/app-service/configure-common.md @@ -126,6 +126,42 @@ 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": "" + } + ] + } + }, + "identity": { + "type": "SystemAssigned" + }, + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]" + ] + }, +``` + +Please refer to [**Microsoft.Web/sites**](/azure/templates/microsoft.web/sites) for more information. + ----- ### Edit app settings in bulk @@ -200,6 +236,46 @@ 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'))]" + ] + }, +``` + +Please refer to [**Microsoft.Web/sites**](/azure/templates/microsoft.web/sites) for more information. + ----- ## Configure connection strings