Microsoft.Web sites/config 'web'

Bicep resource definition

The sites/config resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Options for name property

The sites/config resource accepts different properties based on the value of the name property. This article shows the properties that are available when you set name: 'web'.

For other options, see:

Resource format

To create a Microsoft.Web/sites/config resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Web/sites/config@2022-09-01' = {
  name: 'web'
  kind: 'string'
  parent: resourceSymbolicName
  properties: {
    acrUseManagedIdentityCreds: bool
    acrUserManagedIdentityID: 'string'
    alwaysOn: bool
    apiDefinition: {
      url: 'string'
    }
    apiManagementConfig: {
      id: 'string'
    }
    appCommandLine: 'string'
    appSettings: [
      {
        name: 'string'
        value: 'string'
      }
    ]
    autoHealEnabled: bool
    autoHealRules: {
      actions: {
        actionType: 'string'
        customAction: {
          exe: 'string'
          parameters: 'string'
        }
        minProcessExecutionTime: 'string'
      }
      triggers: {
        privateBytesInKB: int
        requests: {
          count: int
          timeInterval: 'string'
        }
        slowRequests: {
          count: int
          path: 'string'
          timeInterval: 'string'
          timeTaken: 'string'
        }
        slowRequestsWithPath: [
          {
            count: int
            path: 'string'
            timeInterval: 'string'
            timeTaken: 'string'
          }
        ]
        statusCodes: [
          {
            count: int
            path: 'string'
            status: int
            subStatus: int
            timeInterval: 'string'
            win32Status: int
          }
        ]
        statusCodesRange: [
          {
            count: int
            path: 'string'
            statusCodes: 'string'
            timeInterval: 'string'
          }
        ]
      }
    }
    autoSwapSlotName: 'string'
    azureStorageAccounts: {}
    connectionStrings: [
      {
        connectionString: 'string'
        name: 'string'
        type: 'string'
      }
    ]
    cors: {
      allowedOrigins: [
        'string'
      ]
      supportCredentials: bool
    }
    defaultDocuments: [
      'string'
    ]
    detailedErrorLoggingEnabled: bool
    documentRoot: 'string'
    elasticWebAppScaleLimit: int
    experiments: {
      rampUpRules: [
        {
          actionHostName: 'string'
          changeDecisionCallbackUrl: 'string'
          changeIntervalInMinutes: int
          changeStep: int
          maxReroutePercentage: int
          minReroutePercentage: int
          name: 'string'
          reroutePercentage: int
        }
      ]
    }
    ftpsState: 'string'
    functionAppScaleLimit: int
    functionsRuntimeScaleMonitoringEnabled: bool
    handlerMappings: [
      {
        arguments: 'string'
        extension: 'string'
        scriptProcessor: 'string'
      }
    ]
    healthCheckPath: 'string'
    http20Enabled: bool
    httpLoggingEnabled: bool
    ipSecurityRestrictions: [
      {
        action: 'string'
        description: 'string'
        headers: {}
        ipAddress: 'string'
        name: 'string'
        priority: int
        subnetMask: 'string'
        subnetTrafficTag: int
        tag: 'string'
        vnetSubnetResourceId: 'string'
        vnetTrafficTag: int
      }
    ]
    ipSecurityRestrictionsDefaultAction: 'string'
    javaContainer: 'string'
    javaContainerVersion: 'string'
    javaVersion: 'string'
    keyVaultReferenceIdentity: 'string'
    limits: {
      maxDiskSizeInMb: int
      maxMemoryInMb: int
      maxPercentageCpu: int
    }
    linuxFxVersion: 'string'
    loadBalancing: 'string'
    localMySqlEnabled: bool
    logsDirectorySizeLimit: int
    managedPipelineMode: 'string'
    managedServiceIdentityId: int
    metadata: [
      {
        name: 'string'
        value: 'string'
      }
    ]
    minimumElasticInstanceCount: int
    minTlsVersion: 'string'
    netFrameworkVersion: 'string'
    nodeVersion: 'string'
    numberOfWorkers: int
    phpVersion: 'string'
    powerShellVersion: 'string'
    preWarmedInstanceCount: int
    publicNetworkAccess: 'string'
    publishingUsername: 'string'
    push: {
      kind: 'string'
      properties: {
        dynamicTagsJson: 'string'
        isPushEnabled: bool
        tagsRequiringAuth: 'string'
        tagWhitelistJson: 'string'
      }
    }
    pythonVersion: 'string'
    remoteDebuggingEnabled: bool
    remoteDebuggingVersion: 'string'
    requestTracingEnabled: bool
    requestTracingExpirationTime: 'string'
    scmIpSecurityRestrictions: [
      {
        action: 'string'
        description: 'string'
        headers: {}
        ipAddress: 'string'
        name: 'string'
        priority: int
        subnetMask: 'string'
        subnetTrafficTag: int
        tag: 'string'
        vnetSubnetResourceId: 'string'
        vnetTrafficTag: int
      }
    ]
    scmIpSecurityRestrictionsDefaultAction: 'string'
    scmIpSecurityRestrictionsUseMain: bool
    scmMinTlsVersion: 'string'
    scmType: 'string'
    tracingOptions: 'string'
    use32BitWorkerProcess: bool
    virtualApplications: [
      {
        physicalPath: 'string'
        preloadEnabled: bool
        virtualDirectories: [
          {
            physicalPath: 'string'
            virtualPath: 'string'
          }
        ]
        virtualPath: 'string'
      }
    ]
    vnetName: 'string'
    vnetPrivatePortsCount: int
    vnetRouteAllEnabled: bool
    websiteTimeZone: 'string'
    webSocketsEnabled: bool
    windowsFxVersion: 'string'
    xManagedServiceIdentityId: int
  }
}

Property values

sites/config-web

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
'web'
kind Kind of resource. string
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: sites
properties Core resource properties SiteConfig

SiteConfig

Name Description Value
acrUseManagedIdentityCreds Flag to use Managed Identity Creds for ACR pull bool
acrUserManagedIdentityID If using user managed identity, the user managed identity ClientId string
alwaysOn true if Always On is enabled; otherwise, false. bool
apiDefinition Information about the formal API definition for the app. ApiDefinitionInfo
apiManagementConfig Azure API management settings linked to the app. ApiManagementConfig
appCommandLine App command line to launch. string
appSettings Application settings. NameValuePair[]
autoHealEnabled true if Auto Heal is enabled; otherwise, false. bool
autoHealRules Auto Heal rules. AutoHealRules
autoSwapSlotName Auto-swap slot name. string
azureStorageAccounts List of Azure Storage Accounts. object
connectionStrings Connection strings. ConnStringInfo[]
cors Cross-Origin Resource Sharing (CORS) settings. CorsSettings
defaultDocuments Default documents. string[]
detailedErrorLoggingEnabled true if detailed error logging is enabled; otherwise, false. bool
documentRoot Document root. string
elasticWebAppScaleLimit Maximum number of workers that a site can scale out to.
This setting only applies to apps in plans where ElasticScaleEnabled is true
int
experiments This is work around for polymorphic types. Experiments
ftpsState State of FTP / FTPS service 'AllAllowed'
'Disabled'
'FtpsOnly'
functionAppScaleLimit Maximum number of workers that a site can scale out to.
This setting only applies to the Consumption and Elastic Premium Plans
int
functionsRuntimeScaleMonitoringEnabled Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled,
the ScaleController will not monitor event sources directly, but will instead call to the
runtime to get scale status.
bool
handlerMappings Handler mappings. HandlerMapping[]
healthCheckPath Health check path string
http20Enabled Http20Enabled: configures a web site to allow clients to connect over http2.0 bool
httpLoggingEnabled true if HTTP logging is enabled; otherwise, false. bool
ipSecurityRestrictions IP security restrictions for main. IpSecurityRestriction[]
ipSecurityRestrictionsDefaultAction Default action for main access restriction if no rules are matched. 'Allow'
'Deny'
javaContainer Java container. string
javaContainerVersion Java container version. string
javaVersion Java version. string
keyVaultReferenceIdentity Identity to use for Key Vault Reference authentication. string
limits Site limits. SiteLimits
linuxFxVersion Linux App Framework and version string
loadBalancing Site load balancing. 'LeastRequests'
'LeastResponseTime'
'PerSiteRoundRobin'
'RequestHash'
'WeightedRoundRobin'
'WeightedTotalTraffic'
localMySqlEnabled true to enable local MySQL; otherwise, false. bool
logsDirectorySizeLimit HTTP logs directory size limit. int
managedPipelineMode Managed pipeline mode. 'Classic'
'Integrated'
managedServiceIdentityId Managed Service Identity Id int
metadata Application metadata. This property cannot be retrieved, since it may contain secrets. NameValuePair[]
minimumElasticInstanceCount Number of minimum instance count for a site
This setting only applies to the Elastic Plans
int
minTlsVersion MinTlsVersion: configures the minimum version of TLS required for SSL requests '1.0'
'1.1'
'1.2'
netFrameworkVersion .NET Framework version. string
nodeVersion Version of Node.js. string
numberOfWorkers Number of workers. int
phpVersion Version of PHP. string
powerShellVersion Version of PowerShell. string
preWarmedInstanceCount Number of preWarmed instances.
This setting only applies to the Consumption and Elastic Plans
int
publicNetworkAccess Property to allow or block all public traffic. string
publishingUsername Publishing user name. string
push Push endpoint settings. PushSettings
pythonVersion Version of Python. string
remoteDebuggingEnabled true if remote debugging is enabled; otherwise, false. bool
remoteDebuggingVersion Remote debugging version. string
requestTracingEnabled true if request tracing is enabled; otherwise, false. bool
requestTracingExpirationTime Request tracing expiration time. string
scmIpSecurityRestrictions IP security restrictions for scm. IpSecurityRestriction[]
scmIpSecurityRestrictionsDefaultAction Default action for scm access restriction if no rules are matched. 'Allow'
'Deny'
scmIpSecurityRestrictionsUseMain IP security restrictions for scm to use main. bool
scmMinTlsVersion ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site '1.0'
'1.1'
'1.2'
scmType SCM type. 'BitbucketGit'
'BitbucketHg'
'CodePlexGit'
'CodePlexHg'
'Dropbox'
'ExternalGit'
'ExternalHg'
'GitHub'
'LocalGit'
'None'
'OneDrive'
'Tfs'
'VSO'
'VSTSRM'
tracingOptions Tracing options. string
use32BitWorkerProcess true to use 32-bit worker process; otherwise, false. bool
virtualApplications Virtual applications. VirtualApplication[]
vnetName Virtual Network name. string
vnetPrivatePortsCount The number of private ports assigned to this app. These will be assigned dynamically on runtime. int
vnetRouteAllEnabled Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. bool
websiteTimeZone Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones string
webSocketsEnabled true if WebSocket is enabled; otherwise, false. bool
windowsFxVersion Xenon App Framework and version string
xManagedServiceIdentityId Explicit Managed Service Identity Id int

ApiDefinitionInfo

Name Description Value
url The URL of the API definition. string

ApiManagementConfig

Name Description Value
id APIM-Api Identifier. string

NameValuePair

Name Description Value
name Pair name. string
value Pair value. string

AutoHealRules

Name Description Value
actions Actions to be executed when a rule is triggered. AutoHealActions
triggers Conditions that describe when to execute the auto-heal actions. AutoHealTriggers

AutoHealActions

Name Description Value
actionType Predefined action to be taken. 'CustomAction'
'LogEvent'
'Recycle'
customAction Custom action to be taken. AutoHealCustomAction
minProcessExecutionTime Minimum time the process must execute
before taking the action
string

AutoHealCustomAction

Name Description Value
exe Executable to be run. string
parameters Parameters for the executable. string

AutoHealTriggers

Name Description Value
privateBytesInKB A rule based on private bytes. int
requests A rule based on total requests. RequestsBasedTrigger
slowRequests A rule based on request execution time. SlowRequestsBasedTrigger
slowRequestsWithPath A rule based on multiple Slow Requests Rule with path SlowRequestsBasedTrigger[]
statusCodes A rule based on status codes. StatusCodesBasedTrigger[]
statusCodesRange A rule based on status codes ranges. StatusCodesRangeBasedTrigger[]

RequestsBasedTrigger

Name Description Value
count Request Count. int
timeInterval Time interval. string

SlowRequestsBasedTrigger

Name Description Value
count Request Count. int
path Request Path. string
timeInterval Time interval. string
timeTaken Time taken. string

StatusCodesBasedTrigger

Name Description Value
count Request Count. int
path Request Path string
status HTTP status code. int
subStatus Request Sub Status. int
timeInterval Time interval. string
win32Status Win32 error code. int

StatusCodesRangeBasedTrigger

Name Description Value
count Request Count. int
path string
statusCodes HTTP status code. string
timeInterval Time interval. string

ConnStringInfo

Name Description Value
connectionString Connection string value. string
name Name of connection string. string
type Type of database. 'ApiHub'
'Custom'
'DocDb'
'EventHub'
'MySql'
'NotificationHub'
'PostgreSQL'
'RedisCache'
'SQLAzure'
'SQLServer'
'ServiceBus'

CorsSettings

Name Description Value
allowedOrigins Gets or sets the list of origins that should be allowed to make cross-origin
calls (for example: http://example.com:12345). Use "*" to allow all.
string[]
supportCredentials Gets or sets whether CORS requests with credentials are allowed. See
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
for more details.
bool

Experiments

Name Description Value
rampUpRules List of ramp-up rules. RampUpRule[]

RampUpRule

Name Description Value
actionHostName Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net. string
changeDecisionCallbackUrl Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts.
https://www.siteextensions.net/packages/TiPCallback/
string
changeIntervalInMinutes Specifies interval in minutes to reevaluate ReroutePercentage. int
changeStep In auto ramp up scenario this is the step to add/remove from ReroutePercentage until it reaches \nMinReroutePercentage or
MaxReroutePercentage. Site metrics are checked every N minutes specified in ChangeIntervalInMinutes.\nCustom decision algorithm
can be provided in TiPCallback site extension which URL can be specified in ChangeDecisionCallbackUrl.
int
maxReroutePercentage Specifies upper boundary below which ReroutePercentage will stay. int
minReroutePercentage Specifies lower boundary above which ReroutePercentage will stay. int
name Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. string
reroutePercentage Percentage of the traffic which will be redirected to ActionHostName. int

HandlerMapping

Name Description Value
arguments Command-line arguments to be passed to the script processor. string
extension Requests with this extension will be handled using the specified FastCGI application. string
scriptProcessor The absolute path to the FastCGI application. string

IpSecurityRestriction

Name Description Value
action Allow or Deny access for this IP range. string
description IP restriction rule description. string
headers IP restriction rule headers.
X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples).
The matching logic is ..
- If the property is null or empty (default), all hosts(or lack of) are allowed.
- A value is compared using ordinal-ignore-case (excluding port number).
- Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com
but not the root domain contoso.com or multi-level foo.bar.contoso.com
- Unicode host names are allowed but are converted to Punycode for matching.

X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples).
The matching logic is ..
- If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed.
- If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.

X-Azure-FDID and X-FD-HealthProbe.
The matching logic is exact match.
object
ipAddress IP address the security restriction is valid for.
It can be in form of pure ipv4 address (required SubnetMask property) or
CIDR notation such as ipv4/mask (leading bit match). For CIDR,
SubnetMask property must not be specified.
string
name IP restriction rule name. string
priority Priority of IP restriction rule. int
subnetMask Subnet mask for the range of IP addresses the restriction is valid for. string
subnetTrafficTag (internal) Subnet traffic tag int
tag Defines what this IP filter will be used for. This is to support IP filtering on proxies. 'Default'
'ServiceTag'
'XffProxy'
vnetSubnetResourceId Virtual network resource id string
vnetTrafficTag (internal) Vnet traffic tag int

SiteLimits

Name Description Value
maxDiskSizeInMb Maximum allowed disk size usage in MB. int
maxMemoryInMb Maximum allowed memory usage in MB. int
maxPercentageCpu Maximum allowed CPU usage percentage. int

PushSettings

Name Description Value
kind Kind of resource. string
properties PushSettings resource specific properties PushSettingsProperties

PushSettingsProperties

Name Description Value
dynamicTagsJson Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint. string
isPushEnabled Gets or sets a flag indicating whether the Push endpoint is enabled. bool (required)
tagsRequiringAuth Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration endpoint.
Tags can consist of alphanumeric characters and the following:
'_', '@', '#', '.', ':', '-'.
Validation should be performed at the PushRequestHandler.
string
tagWhitelistJson Gets or sets a JSON string containing a list of tags that are allowed for use by the push registration endpoint. string

VirtualApplication

Name Description Value
physicalPath Physical path. string
preloadEnabled true if preloading is enabled; otherwise, false. bool
virtualDirectories Virtual directories for virtual application. VirtualDirectory[]
virtualPath Virtual path. string

VirtualDirectory

Name Description Value
physicalPath Physical path. string
virtualPath Path to virtual application. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Airflow Web App with PostgreSQL database on App Services

Deploy to Azure
A template for deploying Airflow Web App with PostgreSQL database on App Services
EPiserverCMS in Azure

Deploy to Azure
This template allows you to create resources required for EpiServerCMS deployment in Azure
Java CI/CD using Jenkins and Azure Web Apps

Deploy to Azure
This is a sample for Java CI/CD using Jenkins and Azure Web Apps.
Orchard CMS Video Portal Web App

Deploy to Azure
This template provides a easy way to deploy Orchard CMS on Azure App Service Web Apps with the Azure Media Services module enabled and configured.
PubNub Realtime Gateway for Azure Event Hubs

Deploy to Azure
The PubNub Realtime Gateway for Azure provides a realtime data stream bridge between the PubNub Data Stream Network and Azure Event Hubs. -- consider it a bi-directional bridge between PubNub and Azure!
Scalable Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
Simple Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
WordPress on App Service with MySQL In App

Deploy to Azure
This template deploys a WordPress Web App on a Windows App Service with MySQL in app
Enterprise Governance-AppService, SQL DB, AD, OMS, Runbooks

Deploy to Azure
Cloud adoption for an Enterprise, small or large, require responsible and efficient governance models to derive value from their cloud deployments. CloudWise (a code-name for the solution), is a composite solution available from Azure Partner QuickStarts, is an adoption enabler for Customers, System Integrators and Partners alike, that delivers a self-serviceable, automated governance and operations solution, focused on Optimizing Your Costs, Improve Your Application(s) Reliability, Reducing Business Risk. The solution highlights the core governance pillars of Visibility and Control.
WebApp consuming a Azure SQL Private Endpoint

Deploy to Azure
This template shows how to create a Web app that consumes a private endpoint pointing to Azure SQL Server
Moesif API Analytics and Monetization

Deploy to Azure
The template will log API calls from Azure API Management to Moesif API analytics and monetization platform
Call custom APIs from Azure Logic Apps

Deploy to Azure
Although Logic Apps provides hundreds of connectors for various services, you might want to call APIs that run your own code. One of the easiest and most scalable ways to host your own web APIs is by using Azure App Service. This template deploys a Web app for your custom API and secures that API by using Azure Active Directory authentication.
Application Gateway for a Web App with IP Restriction

Deploy to Azure
This template creates an application gateway in front of an Azure Web App with IP restriction enabled on the Web App.
App Service Environment with Azure SQL backend

Deploy to Azure
This template creates an App Service Environment with an Azure SQL backend along with private endpoints along with associated resources typically used in an private/isolated environment.
Provision a function app running on an App Service Plan

Deploy to Azure
This template provisions a function app on a dedicated hosting plan, meaning it will be run and billed just like any App Service site.
Azure Function App with Event Hub and Managed Identity

Deploy to Azure
his template provisions an Azure Function app on a Linux Consumption plan, along with an Event Hub, Azure Storage, and Application Insights. The function app is able to use managed identity to connect to the Event Hub and Storage account
Deploy an Azure Function Premium plan with vnet integration

Deploy to Azure
This template allows you to deploy an Azure Function Premium plan with regional virtual network integration enabled to a newly created virtual network.
Provision a Mobile App with a SQL Database

Deploy to Azure
This template provisions a Mobile App, SQL Database, and Notification Hub. It configures a connection string in the mobile app for the database and notification hub.
Web App with Private Endpoint

Deploy to Azure
This template allows you to create a Web App and expose it through Private Endpoint
Application Gateway with internal API Management and Web App

Deploy to Azure
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
Create Azure Web app with Blob Storage connection string

Deploy to Azure
Creates an Azure Web app with Blob Storage connection string, Template originally authored by Jeff Bowles of Microsoft
Web App with diagnostics logging to Blob Container

Deploy to Azure
Deploy a Web App with diagnostics logging to Storage Account Blob Container enabled.
Create a web app on Azure with Java 13 and Tomcat 9 enabled

Deploy to Azure
This template creates a web app on azure with Java 13 and Tomcat 9 enabled allowing you to run Java applications in Azure. Template was authored by Donovan Brown of Microsoft.
Web App w/ Application Insights sending to Log Analytics

Deploy to Azure
This template will is to help support the new API versions of microsoft.insights/components. Starting with 2020-02-02-preview WorkspaceID will be required when creating Application Inisghts.This template will deploy the App Service Plan, App Service, Application Insights, Log Analytics Workspace and hook it all together.
Web App with Managed Identity, SQL Server and ΑΙ

Deploy to Azure
Simple example to deploy Azure infrastructure for app + data + managed identity + monitoring
Create a Web App + Redis Cache + SQL DB with a template

Deploy to Azure
This template creates an Azure Web App with Redis cache and a SQL Database.
Provision a Web App with a SQL Database

Deploy to Azure
This template provisions a Web App, a SQL Database, AutoScale settings, Alert rules, and App Insights. It configures a connection string in the web app for the database.
Create a Web App plus Redis Cache using a template

Deploy to Azure
This template creates an Azure Web App with Redis cache.
Web App with custom Deployment slots

Deploy to Azure
This template provides an easy way to deploy a web app with custom deployment slots on Azure Web Apps.
Airflow Docker Web App on Linux with PostgreSQL

Deploy to Azure
This template provides a easy way to deploy a puckel/docker-airflow image (latest tag) on a Linux Web App with Azure database for PostgreSQL
Sonarqube Docker Web App on Linux with Azure SQL

Deploy to Azure
This template deploys Sonarqube in an Azure App Service web app Linux container using the official Sonarqube image and backed by an Azure SQL Server.
Sonarqube Docker Web App on Linux with MySQL

Deploy to Azure
This template provides a easy way to deploy a Sonarqube docker image (alpine tag) on a Linux Web App with Azure database for MySQL
Sonarqube Docker Web App on Linux with PostgreSQL

Deploy to Azure
This template provides a easy way to deploy a Sonarqube docker image (alpine tag) on a Linux Web App with Azure database for PostgreSQL(Preview)
Web App with Azure database for MySQL

Deploy to Azure
This template provides a easy way to deploy web app on Azure App Service Web Apps with Azure database for MySQL.
Web App on Linux with PostgreSQL

Deploy to Azure
This template provides a easy way to deploy Web App on Linux with Azure database for PostgreSQL.
Web App with VNet Injection and Private Endpoint

Deploy to Azure
This template allows you to create a secure end to end solution with two web apps, front end and back end, front end will consume securely the back through VNet injection and Private Endpoint

ARM template resource definition

The sites/config resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Options for name property

The sites/config resource accepts different properties based on the value of the name property. This article shows the properties that are available when you set name: 'web'.

For other options, see:

Resource format

To create a Microsoft.Web/sites/config resource, add the following JSON to your template.

{
  "type": "Microsoft.Web/sites/config",
  "apiVersion": "2022-09-01",
  "name": "web",
  "kind": "string",
  "properties": {
    "acrUseManagedIdentityCreds": "bool",
    "acrUserManagedIdentityID": "string",
    "alwaysOn": "bool",
    "apiDefinition": {
      "url": "string"
    },
    "apiManagementConfig": {
      "id": "string"
    },
    "appCommandLine": "string",
    "appSettings": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "autoHealEnabled": "bool",
    "autoHealRules": {
      "actions": {
        "actionType": "string",
        "customAction": {
          "exe": "string",
          "parameters": "string"
        },
        "minProcessExecutionTime": "string"
      },
      "triggers": {
        "privateBytesInKB": "int",
        "requests": {
          "count": "int",
          "timeInterval": "string"
        },
        "slowRequests": {
          "count": "int",
          "path": "string",
          "timeInterval": "string",
          "timeTaken": "string"
        },
        "slowRequestsWithPath": [
          {
            "count": "int",
            "path": "string",
            "timeInterval": "string",
            "timeTaken": "string"
          }
        ],
        "statusCodes": [
          {
            "count": "int",
            "path": "string",
            "status": "int",
            "subStatus": "int",
            "timeInterval": "string",
            "win32Status": "int"
          }
        ],
        "statusCodesRange": [
          {
            "count": "int",
            "path": "string",
            "statusCodes": "string",
            "timeInterval": "string"
          }
        ]
      }
    },
    "autoSwapSlotName": "string",
    "azureStorageAccounts": {},
    "connectionStrings": [
      {
        "connectionString": "string",
        "name": "string",
        "type": "string"
      }
    ],
    "cors": {
      "allowedOrigins": [ "string" ],
      "supportCredentials": "bool"
    },
    "defaultDocuments": [ "string" ],
    "detailedErrorLoggingEnabled": "bool",
    "documentRoot": "string",
    "elasticWebAppScaleLimit": "int",
    "experiments": {
      "rampUpRules": [
        {
          "actionHostName": "string",
          "changeDecisionCallbackUrl": "string",
          "changeIntervalInMinutes": "int",
          "changeStep": "int",
          "maxReroutePercentage": "int",
          "minReroutePercentage": "int",
          "name": "string",
          "reroutePercentage": "int"
        }
      ]
    },
    "ftpsState": "string",
    "functionAppScaleLimit": "int",
    "functionsRuntimeScaleMonitoringEnabled": "bool",
    "handlerMappings": [
      {
        "arguments": "string",
        "extension": "string",
        "scriptProcessor": "string"
      }
    ],
    "healthCheckPath": "string",
    "http20Enabled": "bool",
    "httpLoggingEnabled": "bool",
    "ipSecurityRestrictions": [
      {
        "action": "string",
        "description": "string",
        "headers": {},
        "ipAddress": "string",
        "name": "string",
        "priority": "int",
        "subnetMask": "string",
        "subnetTrafficTag": "int",
        "tag": "string",
        "vnetSubnetResourceId": "string",
        "vnetTrafficTag": "int"
      }
    ],
    "ipSecurityRestrictionsDefaultAction": "string",
    "javaContainer": "string",
    "javaContainerVersion": "string",
    "javaVersion": "string",
    "keyVaultReferenceIdentity": "string",
    "limits": {
      "maxDiskSizeInMb": "int",
      "maxMemoryInMb": "int",
      "maxPercentageCpu": "int"
    },
    "linuxFxVersion": "string",
    "loadBalancing": "string",
    "localMySqlEnabled": "bool",
    "logsDirectorySizeLimit": "int",
    "managedPipelineMode": "string",
    "managedServiceIdentityId": "int",
    "metadata": [
      {
        "name": "string",
        "value": "string"
      }
    ],
    "minimumElasticInstanceCount": "int",
    "minTlsVersion": "string",
    "netFrameworkVersion": "string",
    "nodeVersion": "string",
    "numberOfWorkers": "int",
    "phpVersion": "string",
    "powerShellVersion": "string",
    "preWarmedInstanceCount": "int",
    "publicNetworkAccess": "string",
    "publishingUsername": "string",
    "push": {
      "kind": "string",
      "properties": {
        "dynamicTagsJson": "string",
        "isPushEnabled": "bool",
        "tagsRequiringAuth": "string",
        "tagWhitelistJson": "string"
      }
    },
    "pythonVersion": "string",
    "remoteDebuggingEnabled": "bool",
    "remoteDebuggingVersion": "string",
    "requestTracingEnabled": "bool",
    "requestTracingExpirationTime": "string",
    "scmIpSecurityRestrictions": [
      {
        "action": "string",
        "description": "string",
        "headers": {},
        "ipAddress": "string",
        "name": "string",
        "priority": "int",
        "subnetMask": "string",
        "subnetTrafficTag": "int",
        "tag": "string",
        "vnetSubnetResourceId": "string",
        "vnetTrafficTag": "int"
      }
    ],
    "scmIpSecurityRestrictionsDefaultAction": "string",
    "scmIpSecurityRestrictionsUseMain": "bool",
    "scmMinTlsVersion": "string",
    "scmType": "string",
    "tracingOptions": "string",
    "use32BitWorkerProcess": "bool",
    "virtualApplications": [
      {
        "physicalPath": "string",
        "preloadEnabled": "bool",
        "virtualDirectories": [
          {
            "physicalPath": "string",
            "virtualPath": "string"
          }
        ],
        "virtualPath": "string"
      }
    ],
    "vnetName": "string",
    "vnetPrivatePortsCount": "int",
    "vnetRouteAllEnabled": "bool",
    "websiteTimeZone": "string",
    "webSocketsEnabled": "bool",
    "windowsFxVersion": "string",
    "xManagedServiceIdentityId": "int"
  }
}

Property values

sites/config-web

Name Description Value
type The resource type 'Microsoft.Web/sites/config'
apiVersion The resource api version '2022-09-01'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
'web'
kind Kind of resource. string
properties Core resource properties SiteConfig

SiteConfig

Name Description Value
acrUseManagedIdentityCreds Flag to use Managed Identity Creds for ACR pull bool
acrUserManagedIdentityID If using user managed identity, the user managed identity ClientId string
alwaysOn true if Always On is enabled; otherwise, false. bool
apiDefinition Information about the formal API definition for the app. ApiDefinitionInfo
apiManagementConfig Azure API management settings linked to the app. ApiManagementConfig
appCommandLine App command line to launch. string
appSettings Application settings. NameValuePair[]
autoHealEnabled true if Auto Heal is enabled; otherwise, false. bool
autoHealRules Auto Heal rules. AutoHealRules
autoSwapSlotName Auto-swap slot name. string
azureStorageAccounts List of Azure Storage Accounts. object
connectionStrings Connection strings. ConnStringInfo[]
cors Cross-Origin Resource Sharing (CORS) settings. CorsSettings
defaultDocuments Default documents. string[]
detailedErrorLoggingEnabled true if detailed error logging is enabled; otherwise, false. bool
documentRoot Document root. string
elasticWebAppScaleLimit Maximum number of workers that a site can scale out to.
This setting only applies to apps in plans where ElasticScaleEnabled is true
int
experiments This is work around for polymorphic types. Experiments
ftpsState State of FTP / FTPS service 'AllAllowed'
'Disabled'
'FtpsOnly'
functionAppScaleLimit Maximum number of workers that a site can scale out to.
This setting only applies to the Consumption and Elastic Premium Plans
int
functionsRuntimeScaleMonitoringEnabled Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled,
the ScaleController will not monitor event sources directly, but will instead call to the
runtime to get scale status.
bool
handlerMappings Handler mappings. HandlerMapping[]
healthCheckPath Health check path string
http20Enabled Http20Enabled: configures a web site to allow clients to connect over http2.0 bool
httpLoggingEnabled true if HTTP logging is enabled; otherwise, false. bool
ipSecurityRestrictions IP security restrictions for main. IpSecurityRestriction[]
ipSecurityRestrictionsDefaultAction Default action for main access restriction if no rules are matched. 'Allow'
'Deny'
javaContainer Java container. string
javaContainerVersion Java container version. string
javaVersion Java version. string
keyVaultReferenceIdentity Identity to use for Key Vault Reference authentication. string
limits Site limits. SiteLimits
linuxFxVersion Linux App Framework and version string
loadBalancing Site load balancing. 'LeastRequests'
'LeastResponseTime'
'PerSiteRoundRobin'
'RequestHash'
'WeightedRoundRobin'
'WeightedTotalTraffic'
localMySqlEnabled true to enable local MySQL; otherwise, false. bool
logsDirectorySizeLimit HTTP logs directory size limit. int
managedPipelineMode Managed pipeline mode. 'Classic'
'Integrated'
managedServiceIdentityId Managed Service Identity Id int
metadata Application metadata. This property cannot be retrieved, since it may contain secrets. NameValuePair[]
minimumElasticInstanceCount Number of minimum instance count for a site
This setting only applies to the Elastic Plans
int
minTlsVersion MinTlsVersion: configures the minimum version of TLS required for SSL requests '1.0'
'1.1'
'1.2'
netFrameworkVersion .NET Framework version. string
nodeVersion Version of Node.js. string
numberOfWorkers Number of workers. int
phpVersion Version of PHP. string
powerShellVersion Version of PowerShell. string
preWarmedInstanceCount Number of preWarmed instances.
This setting only applies to the Consumption and Elastic Plans
int
publicNetworkAccess Property to allow or block all public traffic. string
publishingUsername Publishing user name. string
push Push endpoint settings. PushSettings
pythonVersion Version of Python. string
remoteDebuggingEnabled true if remote debugging is enabled; otherwise, false. bool
remoteDebuggingVersion Remote debugging version. string
requestTracingEnabled true if request tracing is enabled; otherwise, false. bool
requestTracingExpirationTime Request tracing expiration time. string
scmIpSecurityRestrictions IP security restrictions for scm. IpSecurityRestriction[]
scmIpSecurityRestrictionsDefaultAction Default action for scm access restriction if no rules are matched. 'Allow'
'Deny'
scmIpSecurityRestrictionsUseMain IP security restrictions for scm to use main. bool
scmMinTlsVersion ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site '1.0'
'1.1'
'1.2'
scmType SCM type. 'BitbucketGit'
'BitbucketHg'
'CodePlexGit'
'CodePlexHg'
'Dropbox'
'ExternalGit'
'ExternalHg'
'GitHub'
'LocalGit'
'None'
'OneDrive'
'Tfs'
'VSO'
'VSTSRM'
tracingOptions Tracing options. string
use32BitWorkerProcess true to use 32-bit worker process; otherwise, false. bool
virtualApplications Virtual applications. VirtualApplication[]
vnetName Virtual Network name. string
vnetPrivatePortsCount The number of private ports assigned to this app. These will be assigned dynamically on runtime. int
vnetRouteAllEnabled Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. bool
websiteTimeZone Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones string
webSocketsEnabled true if WebSocket is enabled; otherwise, false. bool
windowsFxVersion Xenon App Framework and version string
xManagedServiceIdentityId Explicit Managed Service Identity Id int

ApiDefinitionInfo

Name Description Value
url The URL of the API definition. string

ApiManagementConfig

Name Description Value
id APIM-Api Identifier. string

NameValuePair

Name Description Value
name Pair name. string
value Pair value. string

AutoHealRules

Name Description Value
actions Actions to be executed when a rule is triggered. AutoHealActions
triggers Conditions that describe when to execute the auto-heal actions. AutoHealTriggers

AutoHealActions

Name Description Value
actionType Predefined action to be taken. 'CustomAction'
'LogEvent'
'Recycle'
customAction Custom action to be taken. AutoHealCustomAction
minProcessExecutionTime Minimum time the process must execute
before taking the action
string

AutoHealCustomAction

Name Description Value
exe Executable to be run. string
parameters Parameters for the executable. string

AutoHealTriggers

Name Description Value
privateBytesInKB A rule based on private bytes. int
requests A rule based on total requests. RequestsBasedTrigger
slowRequests A rule based on request execution time. SlowRequestsBasedTrigger
slowRequestsWithPath A rule based on multiple Slow Requests Rule with path SlowRequestsBasedTrigger[]
statusCodes A rule based on status codes. StatusCodesBasedTrigger[]
statusCodesRange A rule based on status codes ranges. StatusCodesRangeBasedTrigger[]

RequestsBasedTrigger

Name Description Value
count Request Count. int
timeInterval Time interval. string

SlowRequestsBasedTrigger

Name Description Value
count Request Count. int
path Request Path. string
timeInterval Time interval. string
timeTaken Time taken. string

StatusCodesBasedTrigger

Name Description Value
count Request Count. int
path Request Path string
status HTTP status code. int
subStatus Request Sub Status. int
timeInterval Time interval. string
win32Status Win32 error code. int

StatusCodesRangeBasedTrigger

Name Description Value
count Request Count. int
path string
statusCodes HTTP status code. string
timeInterval Time interval. string

ConnStringInfo

Name Description Value
connectionString Connection string value. string
name Name of connection string. string
type Type of database. 'ApiHub'
'Custom'
'DocDb'
'EventHub'
'MySql'
'NotificationHub'
'PostgreSQL'
'RedisCache'
'SQLAzure'
'SQLServer'
'ServiceBus'

CorsSettings

Name Description Value
allowedOrigins Gets or sets the list of origins that should be allowed to make cross-origin
calls (for example: http://example.com:12345). Use "*" to allow all.
string[]
supportCredentials Gets or sets whether CORS requests with credentials are allowed. See
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
for more details.
bool

Experiments

Name Description Value
rampUpRules List of ramp-up rules. RampUpRule[]

RampUpRule

Name Description Value
actionHostName Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net. string
changeDecisionCallbackUrl Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts.
https://www.siteextensions.net/packages/TiPCallback/
string
changeIntervalInMinutes Specifies interval in minutes to reevaluate ReroutePercentage. int
changeStep In auto ramp up scenario this is the step to add/remove from ReroutePercentage until it reaches \nMinReroutePercentage or
MaxReroutePercentage. Site metrics are checked every N minutes specified in ChangeIntervalInMinutes.\nCustom decision algorithm
can be provided in TiPCallback site extension which URL can be specified in ChangeDecisionCallbackUrl.
int
maxReroutePercentage Specifies upper boundary below which ReroutePercentage will stay. int
minReroutePercentage Specifies lower boundary above which ReroutePercentage will stay. int
name Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. string
reroutePercentage Percentage of the traffic which will be redirected to ActionHostName. int

HandlerMapping

Name Description Value
arguments Command-line arguments to be passed to the script processor. string
extension Requests with this extension will be handled using the specified FastCGI application. string
scriptProcessor The absolute path to the FastCGI application. string

IpSecurityRestriction

Name Description Value
action Allow or Deny access for this IP range. string
description IP restriction rule description. string
headers IP restriction rule headers.
X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples).
The matching logic is ..
- If the property is null or empty (default), all hosts(or lack of) are allowed.
- A value is compared using ordinal-ignore-case (excluding port number).
- Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com
but not the root domain contoso.com or multi-level foo.bar.contoso.com
- Unicode host names are allowed but are converted to Punycode for matching.

X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples).
The matching logic is ..
- If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed.
- If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.

X-Azure-FDID and X-FD-HealthProbe.
The matching logic is exact match.
object
ipAddress IP address the security restriction is valid for.
It can be in form of pure ipv4 address (required SubnetMask property) or
CIDR notation such as ipv4/mask (leading bit match). For CIDR,
SubnetMask property must not be specified.
string
name IP restriction rule name. string
priority Priority of IP restriction rule. int
subnetMask Subnet mask for the range of IP addresses the restriction is valid for. string
subnetTrafficTag (internal) Subnet traffic tag int
tag Defines what this IP filter will be used for. This is to support IP filtering on proxies. 'Default'
'ServiceTag'
'XffProxy'
vnetSubnetResourceId Virtual network resource id string
vnetTrafficTag (internal) Vnet traffic tag int

SiteLimits

Name Description Value
maxDiskSizeInMb Maximum allowed disk size usage in MB. int
maxMemoryInMb Maximum allowed memory usage in MB. int
maxPercentageCpu Maximum allowed CPU usage percentage. int

PushSettings

Name Description Value
kind Kind of resource. string
properties PushSettings resource specific properties PushSettingsProperties

PushSettingsProperties

Name Description Value
dynamicTagsJson Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint. string
isPushEnabled Gets or sets a flag indicating whether the Push endpoint is enabled. bool (required)
tagsRequiringAuth Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration endpoint.
Tags can consist of alphanumeric characters and the following:
'_', '@', '#', '.', ':', '-'.
Validation should be performed at the PushRequestHandler.
string
tagWhitelistJson Gets or sets a JSON string containing a list of tags that are allowed for use by the push registration endpoint. string

VirtualApplication

Name Description Value
physicalPath Physical path. string
preloadEnabled true if preloading is enabled; otherwise, false. bool
virtualDirectories Virtual directories for virtual application. VirtualDirectory[]
virtualPath Virtual path. string

VirtualDirectory

Name Description Value
physicalPath Physical path. string
virtualPath Path to virtual application. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Airflow Web App with PostgreSQL database on App Services

Deploy to Azure
A template for deploying Airflow Web App with PostgreSQL database on App Services
EPiserverCMS in Azure

Deploy to Azure
This template allows you to create resources required for EpiServerCMS deployment in Azure
Java CI/CD using Jenkins and Azure Web Apps

Deploy to Azure
This is a sample for Java CI/CD using Jenkins and Azure Web Apps.
Orchard CMS Video Portal Web App

Deploy to Azure
This template provides a easy way to deploy Orchard CMS on Azure App Service Web Apps with the Azure Media Services module enabled and configured.
PubNub Realtime Gateway for Azure Event Hubs

Deploy to Azure
The PubNub Realtime Gateway for Azure provides a realtime data stream bridge between the PubNub Data Stream Network and Azure Event Hubs. -- consider it a bi-directional bridge between PubNub and Azure!
Scalable Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
Simple Umbraco CMS Web App

Deploy to Azure
This template provides a easy way to deploy umbraco CMS web app on Azure App Service Web Apps.
WordPress on App Service with MySQL In App

Deploy to Azure
This template deploys a WordPress Web App on a Windows App Service with MySQL in app
Enterprise Governance-AppService, SQL DB, AD, OMS, Runbooks

Deploy to Azure
Cloud adoption for an Enterprise, small or large, require responsible and efficient governance models to derive value from their cloud deployments. CloudWise (a code-name for the solution), is a composite solution available from Azure Partner QuickStarts, is an adoption enabler for Customers, System Integrators and Partners alike, that delivers a self-serviceable, automated governance and operations solution, focused on Optimizing Your Costs, Improve Your Application(s) Reliability, Reducing Business Risk. The solution highlights the core governance pillars of Visibility and Control.
WebApp consuming a Azure SQL Private Endpoint

Deploy to Azure
This template shows how to create a Web app that consumes a private endpoint pointing to Azure SQL Server
Moesif API Analytics and Monetization

Deploy to Azure
The template will log API calls from Azure API Management to Moesif API analytics and monetization platform
Call custom APIs from Azure Logic Apps

Deploy to Azure
Although Logic Apps provides hundreds of connectors for various services, you might want to call APIs that run your own code. One of the easiest and most scalable ways to host your own web APIs is by using Azure App Service. This template deploys a Web app for your custom API and secures that API by using Azure Active Directory authentication.
Application Gateway for a Web App with IP Restriction

Deploy to Azure
This template creates an application gateway in front of an Azure Web App with IP restriction enabled on the Web App.
App Service Environment with Azure SQL backend

Deploy to Azure
This template creates an App Service Environment with an Azure SQL backend along with private endpoints along with associated resources typically used in an private/isolated environment.
Provision a function app running on an App Service Plan

Deploy to Azure
This template provisions a function app on a dedicated hosting plan, meaning it will be run and billed just like any App Service site.
Azure Function App with Event Hub and Managed Identity

Deploy to Azure
his template provisions an Azure Function app on a Linux Consumption plan, along with an Event Hub, Azure Storage, and Application Insights. The function app is able to use managed identity to connect to the Event Hub and Storage account
Deploy an Azure Function Premium plan with vnet integration

Deploy to Azure
This template allows you to deploy an Azure Function Premium plan with regional virtual network integration enabled to a newly created virtual network.
Provision a Mobile App with a SQL Database

Deploy to Azure
This template provisions a Mobile App, SQL Database, and Notification Hub. It configures a connection string in the mobile app for the database and notification hub.
Web App with Private Endpoint

Deploy to Azure
This template allows you to create a Web App and expose it through Private Endpoint
Application Gateway with internal API Management and Web App

Deploy to Azure
Application Gateway routing Internet traffic to a virtual network (internal mode) API Management instance which services a web API hosted in an Azure Web App.
Create Azure Web app with Blob Storage connection string

Deploy to Azure
Creates an Azure Web app with Blob Storage connection string, Template originally authored by Jeff Bowles of Microsoft
Web App with diagnostics logging to Blob Container

Deploy to Azure
Deploy a Web App with diagnostics logging to Storage Account Blob Container enabled.
Create a web app on Azure with Java 13 and Tomcat 9 enabled

Deploy to Azure
This template creates a web app on azure with Java 13 and Tomcat 9 enabled allowing you to run Java applications in Azure. Template was authored by Donovan Brown of Microsoft.
Web App w/ Application Insights sending to Log Analytics

Deploy to Azure
This template will is to help support the new API versions of microsoft.insights/components. Starting with 2020-02-02-preview WorkspaceID will be required when creating Application Inisghts.This template will deploy the App Service Plan, App Service, Application Insights, Log Analytics Workspace and hook it all together.
Web App with Managed Identity, SQL Server and ΑΙ

Deploy to Azure
Simple example to deploy Azure infrastructure for app + data + managed identity + monitoring
Create a Web App + Redis Cache + SQL DB with a template

Deploy to Azure
This template creates an Azure Web App with Redis cache and a SQL Database.
Provision a Web App with a SQL Database

Deploy to Azure
This template provisions a Web App, a SQL Database, AutoScale settings, Alert rules, and App Insights. It configures a connection string in the web app for the database.
Create a Web App plus Redis Cache using a template

Deploy to Azure
This template creates an Azure Web App with Redis cache.
Web App with custom Deployment slots

Deploy to Azure
This template provides an easy way to deploy a web app with custom deployment slots on Azure Web Apps.
Airflow Docker Web App on Linux with PostgreSQL

Deploy to Azure
This template provides a easy way to deploy a puckel/docker-airflow image (latest tag) on a Linux Web App with Azure database for PostgreSQL
Sonarqube Docker Web App on Linux with Azure SQL

Deploy to Azure
This template deploys Sonarqube in an Azure App Service web app Linux container using the official Sonarqube image and backed by an Azure SQL Server.
Sonarqube Docker Web App on Linux with MySQL

Deploy to Azure
This template provides a easy way to deploy a Sonarqube docker image (alpine tag) on a Linux Web App with Azure database for MySQL
Sonarqube Docker Web App on Linux with PostgreSQL

Deploy to Azure
This template provides a easy way to deploy a Sonarqube docker image (alpine tag) on a Linux Web App with Azure database for PostgreSQL(Preview)
Web App with Azure database for MySQL

Deploy to Azure
This template provides a easy way to deploy web app on Azure App Service Web Apps with Azure database for MySQL.
Web App on Linux with PostgreSQL

Deploy to Azure
This template provides a easy way to deploy Web App on Linux with Azure database for PostgreSQL.
Web App with VNet Injection and Private Endpoint

Deploy to Azure
This template allows you to create a secure end to end solution with two web apps, front end and back end, front end will consume securely the back through VNet injection and Private Endpoint

Terraform (AzAPI provider) resource definition

The sites/config resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Options for name property

The sites/config resource accepts different properties based on the value of the name property. This article shows the properties that are available when you set name: 'web'.

For other options, see:

Resource format

To create a Microsoft.Web/sites/config resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Web/sites/config@2022-09-01"
  name = "web"
  parent_id = "string"
  body = jsonencode({
    properties = {
      acrUseManagedIdentityCreds = bool
      acrUserManagedIdentityID = "string"
      alwaysOn = bool
      apiDefinition = {
        url = "string"
      }
      apiManagementConfig = {
        id = "string"
      }
      appCommandLine = "string"
      appSettings = [
        {
          name = "string"
          value = "string"
        }
      ]
      autoHealEnabled = bool
      autoHealRules = {
        actions = {
          actionType = "string"
          customAction = {
            exe = "string"
            parameters = "string"
          }
          minProcessExecutionTime = "string"
        }
        triggers = {
          privateBytesInKB = int
          requests = {
            count = int
            timeInterval = "string"
          }
          slowRequests = {
            count = int
            path = "string"
            timeInterval = "string"
            timeTaken = "string"
          }
          slowRequestsWithPath = [
            {
              count = int
              path = "string"
              timeInterval = "string"
              timeTaken = "string"
            }
          ]
          statusCodes = [
            {
              count = int
              path = "string"
              status = int
              subStatus = int
              timeInterval = "string"
              win32Status = int
            }
          ]
          statusCodesRange = [
            {
              count = int
              path = "string"
              statusCodes = "string"
              timeInterval = "string"
            }
          ]
        }
      }
      autoSwapSlotName = "string"
      azureStorageAccounts = {}
      connectionStrings = [
        {
          connectionString = "string"
          name = "string"
          type = "string"
        }
      ]
      cors = {
        allowedOrigins = [
          "string"
        ]
        supportCredentials = bool
      }
      defaultDocuments = [
        "string"
      ]
      detailedErrorLoggingEnabled = bool
      documentRoot = "string"
      elasticWebAppScaleLimit = int
      experiments = {
        rampUpRules = [
          {
            actionHostName = "string"
            changeDecisionCallbackUrl = "string"
            changeIntervalInMinutes = int
            changeStep = int
            maxReroutePercentage = int
            minReroutePercentage = int
            name = "string"
            reroutePercentage = int
          }
        ]
      }
      ftpsState = "string"
      functionAppScaleLimit = int
      functionsRuntimeScaleMonitoringEnabled = bool
      handlerMappings = [
        {
          arguments = "string"
          extension = "string"
          scriptProcessor = "string"
        }
      ]
      healthCheckPath = "string"
      http20Enabled = bool
      httpLoggingEnabled = bool
      ipSecurityRestrictions = [
        {
          action = "string"
          description = "string"
          headers = {}
          ipAddress = "string"
          name = "string"
          priority = int
          subnetMask = "string"
          subnetTrafficTag = int
          tag = "string"
          vnetSubnetResourceId = "string"
          vnetTrafficTag = int
        }
      ]
      ipSecurityRestrictionsDefaultAction = "string"
      javaContainer = "string"
      javaContainerVersion = "string"
      javaVersion = "string"
      keyVaultReferenceIdentity = "string"
      limits = {
        maxDiskSizeInMb = int
        maxMemoryInMb = int
        maxPercentageCpu = int
      }
      linuxFxVersion = "string"
      loadBalancing = "string"
      localMySqlEnabled = bool
      logsDirectorySizeLimit = int
      managedPipelineMode = "string"
      managedServiceIdentityId = int
      metadata = [
        {
          name = "string"
          value = "string"
        }
      ]
      minimumElasticInstanceCount = int
      minTlsVersion = "string"
      netFrameworkVersion = "string"
      nodeVersion = "string"
      numberOfWorkers = int
      phpVersion = "string"
      powerShellVersion = "string"
      preWarmedInstanceCount = int
      publicNetworkAccess = "string"
      publishingUsername = "string"
      push = {
        kind = "string"
        properties = {
          dynamicTagsJson = "string"
          isPushEnabled = bool
          tagsRequiringAuth = "string"
          tagWhitelistJson = "string"
        }
      }
      pythonVersion = "string"
      remoteDebuggingEnabled = bool
      remoteDebuggingVersion = "string"
      requestTracingEnabled = bool
      requestTracingExpirationTime = "string"
      scmIpSecurityRestrictions = [
        {
          action = "string"
          description = "string"
          headers = {}
          ipAddress = "string"
          name = "string"
          priority = int
          subnetMask = "string"
          subnetTrafficTag = int
          tag = "string"
          vnetSubnetResourceId = "string"
          vnetTrafficTag = int
        }
      ]
      scmIpSecurityRestrictionsDefaultAction = "string"
      scmIpSecurityRestrictionsUseMain = bool
      scmMinTlsVersion = "string"
      scmType = "string"
      tracingOptions = "string"
      use32BitWorkerProcess = bool
      virtualApplications = [
        {
          physicalPath = "string"
          preloadEnabled = bool
          virtualDirectories = [
            {
              physicalPath = "string"
              virtualPath = "string"
            }
          ]
          virtualPath = "string"
        }
      ]
      vnetName = "string"
      vnetPrivatePortsCount = int
      vnetRouteAllEnabled = bool
      websiteTimeZone = "string"
      webSocketsEnabled = bool
      windowsFxVersion = "string"
      xManagedServiceIdentityId = int
    }
    kind = "string"
  })
}

Property values

sites/config-web

Name Description Value
type The resource type "Microsoft.Web/sites/config@2022-09-01"
name The resource name "web"
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: sites
kind Kind of resource. string
properties Core resource properties SiteConfig

SiteConfig

Name Description Value
acrUseManagedIdentityCreds Flag to use Managed Identity Creds for ACR pull bool
acrUserManagedIdentityID If using user managed identity, the user managed identity ClientId string
alwaysOn true if Always On is enabled; otherwise, false. bool
apiDefinition Information about the formal API definition for the app. ApiDefinitionInfo
apiManagementConfig Azure API management settings linked to the app. ApiManagementConfig
appCommandLine App command line to launch. string
appSettings Application settings. NameValuePair[]
autoHealEnabled true if Auto Heal is enabled; otherwise, false. bool
autoHealRules Auto Heal rules. AutoHealRules
autoSwapSlotName Auto-swap slot name. string
azureStorageAccounts List of Azure Storage Accounts. object
connectionStrings Connection strings. ConnStringInfo[]
cors Cross-Origin Resource Sharing (CORS) settings. CorsSettings
defaultDocuments Default documents. string[]
detailedErrorLoggingEnabled true if detailed error logging is enabled; otherwise, false. bool
documentRoot Document root. string
elasticWebAppScaleLimit Maximum number of workers that a site can scale out to.
This setting only applies to apps in plans where ElasticScaleEnabled is true
int
experiments This is work around for polymorphic types. Experiments
ftpsState State of FTP / FTPS service "AllAllowed"
"Disabled"
"FtpsOnly"
functionAppScaleLimit Maximum number of workers that a site can scale out to.
This setting only applies to the Consumption and Elastic Premium Plans
int
functionsRuntimeScaleMonitoringEnabled Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled,
the ScaleController will not monitor event sources directly, but will instead call to the
runtime to get scale status.
bool
handlerMappings Handler mappings. HandlerMapping[]
healthCheckPath Health check path string
http20Enabled Http20Enabled: configures a web site to allow clients to connect over http2.0 bool
httpLoggingEnabled true if HTTP logging is enabled; otherwise, false. bool
ipSecurityRestrictions IP security restrictions for main. IpSecurityRestriction[]
ipSecurityRestrictionsDefaultAction Default action for main access restriction if no rules are matched. "Allow"
"Deny"
javaContainer Java container. string
javaContainerVersion Java container version. string
javaVersion Java version. string
keyVaultReferenceIdentity Identity to use for Key Vault Reference authentication. string
limits Site limits. SiteLimits
linuxFxVersion Linux App Framework and version string
loadBalancing Site load balancing. "LeastRequests"
"LeastResponseTime"
"PerSiteRoundRobin"
"RequestHash"
"WeightedRoundRobin"
"WeightedTotalTraffic"
localMySqlEnabled true to enable local MySQL; otherwise, false. bool
logsDirectorySizeLimit HTTP logs directory size limit. int
managedPipelineMode Managed pipeline mode. "Classic"
"Integrated"
managedServiceIdentityId Managed Service Identity Id int
metadata Application metadata. This property cannot be retrieved, since it may contain secrets. NameValuePair[]
minimumElasticInstanceCount Number of minimum instance count for a site
This setting only applies to the Elastic Plans
int
minTlsVersion MinTlsVersion: configures the minimum version of TLS required for SSL requests "1.0"
"1.1"
"1.2"
netFrameworkVersion .NET Framework version. string
nodeVersion Version of Node.js. string
numberOfWorkers Number of workers. int
phpVersion Version of PHP. string
powerShellVersion Version of PowerShell. string
preWarmedInstanceCount Number of preWarmed instances.
This setting only applies to the Consumption and Elastic Plans
int
publicNetworkAccess Property to allow or block all public traffic. string
publishingUsername Publishing user name. string
push Push endpoint settings. PushSettings
pythonVersion Version of Python. string
remoteDebuggingEnabled true if remote debugging is enabled; otherwise, false. bool
remoteDebuggingVersion Remote debugging version. string
requestTracingEnabled true if request tracing is enabled; otherwise, false. bool
requestTracingExpirationTime Request tracing expiration time. string
scmIpSecurityRestrictions IP security restrictions for scm. IpSecurityRestriction[]
scmIpSecurityRestrictionsDefaultAction Default action for scm access restriction if no rules are matched. "Allow"
"Deny"
scmIpSecurityRestrictionsUseMain IP security restrictions for scm to use main. bool
scmMinTlsVersion ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site "1.0"
"1.1"
"1.2"
scmType SCM type. "BitbucketGit"
"BitbucketHg"
"CodePlexGit"
"CodePlexHg"
"Dropbox"
"ExternalGit"
"ExternalHg"
"GitHub"
"LocalGit"
"None"
"OneDrive"
"Tfs"
"VSO"
"VSTSRM"
tracingOptions Tracing options. string
use32BitWorkerProcess true to use 32-bit worker process; otherwise, false. bool
virtualApplications Virtual applications. VirtualApplication[]
vnetName Virtual Network name. string
vnetPrivatePortsCount The number of private ports assigned to this app. These will be assigned dynamically on runtime. int
vnetRouteAllEnabled Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied. bool
websiteTimeZone Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones string
webSocketsEnabled true if WebSocket is enabled; otherwise, false. bool
windowsFxVersion Xenon App Framework and version string
xManagedServiceIdentityId Explicit Managed Service Identity Id int

ApiDefinitionInfo

Name Description Value
url The URL of the API definition. string

ApiManagementConfig

Name Description Value
id APIM-Api Identifier. string

NameValuePair

Name Description Value
name Pair name. string
value Pair value. string

AutoHealRules

Name Description Value
actions Actions to be executed when a rule is triggered. AutoHealActions
triggers Conditions that describe when to execute the auto-heal actions. AutoHealTriggers

AutoHealActions

Name Description Value
actionType Predefined action to be taken. "CustomAction"
"LogEvent"
"Recycle"
customAction Custom action to be taken. AutoHealCustomAction
minProcessExecutionTime Minimum time the process must execute
before taking the action
string

AutoHealCustomAction

Name Description Value
exe Executable to be run. string
parameters Parameters for the executable. string

AutoHealTriggers

Name Description Value
privateBytesInKB A rule based on private bytes. int
requests A rule based on total requests. RequestsBasedTrigger
slowRequests A rule based on request execution time. SlowRequestsBasedTrigger
slowRequestsWithPath A rule based on multiple Slow Requests Rule with path SlowRequestsBasedTrigger[]
statusCodes A rule based on status codes. StatusCodesBasedTrigger[]
statusCodesRange A rule based on status codes ranges. StatusCodesRangeBasedTrigger[]

RequestsBasedTrigger

Name Description Value
count Request Count. int
timeInterval Time interval. string

SlowRequestsBasedTrigger

Name Description Value
count Request Count. int
path Request Path. string
timeInterval Time interval. string
timeTaken Time taken. string

StatusCodesBasedTrigger

Name Description Value
count Request Count. int
path Request Path string
status HTTP status code. int
subStatus Request Sub Status. int
timeInterval Time interval. string
win32Status Win32 error code. int

StatusCodesRangeBasedTrigger

Name Description Value
count Request Count. int
path string
statusCodes HTTP status code. string
timeInterval Time interval. string

ConnStringInfo

Name Description Value
connectionString Connection string value. string
name Name of connection string. string
type Type of database. "ApiHub"
"Custom"
"DocDb"
"EventHub"
"MySql"
"NotificationHub"
"PostgreSQL"
"RedisCache"
"SQLAzure"
"SQLServer"
"ServiceBus"

CorsSettings

Name Description Value
allowedOrigins Gets or sets the list of origins that should be allowed to make cross-origin
calls (for example: http://example.com:12345). Use "*" to allow all.
string[]
supportCredentials Gets or sets whether CORS requests with credentials are allowed. See
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials
for more details.
bool

Experiments

Name Description Value
rampUpRules List of ramp-up rules. RampUpRule[]

RampUpRule

Name Description Value
actionHostName Hostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net. string
changeDecisionCallbackUrl Custom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts.
https://www.siteextensions.net/packages/TiPCallback/
string
changeIntervalInMinutes Specifies interval in minutes to reevaluate ReroutePercentage. int
changeStep In auto ramp up scenario this is the step to add/remove from ReroutePercentage until it reaches \nMinReroutePercentage or
MaxReroutePercentage. Site metrics are checked every N minutes specified in ChangeIntervalInMinutes.\nCustom decision algorithm
can be provided in TiPCallback site extension which URL can be specified in ChangeDecisionCallbackUrl.
int
maxReroutePercentage Specifies upper boundary below which ReroutePercentage will stay. int
minReroutePercentage Specifies lower boundary above which ReroutePercentage will stay. int
name Name of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment. string
reroutePercentage Percentage of the traffic which will be redirected to ActionHostName. int

HandlerMapping

Name Description Value
arguments Command-line arguments to be passed to the script processor. string
extension Requests with this extension will be handled using the specified FastCGI application. string
scriptProcessor The absolute path to the FastCGI application. string

IpSecurityRestriction

Name Description Value
action Allow or Deny access for this IP range. string
description IP restriction rule description. string
headers IP restriction rule headers.
X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples).
The matching logic is ..
- If the property is null or empty (default), all hosts(or lack of) are allowed.
- A value is compared using ordinal-ignore-case (excluding port number).
- Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com
but not the root domain contoso.com or multi-level foo.bar.contoso.com
- Unicode host names are allowed but are converted to Punycode for matching.

X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples).
The matching logic is ..
- If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed.
- If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.

X-Azure-FDID and X-FD-HealthProbe.
The matching logic is exact match.
object
ipAddress IP address the security restriction is valid for.
It can be in form of pure ipv4 address (required SubnetMask property) or
CIDR notation such as ipv4/mask (leading bit match). For CIDR,
SubnetMask property must not be specified.
string
name IP restriction rule name. string
priority Priority of IP restriction rule. int
subnetMask Subnet mask for the range of IP addresses the restriction is valid for. string
subnetTrafficTag (internal) Subnet traffic tag int
tag Defines what this IP filter will be used for. This is to support IP filtering on proxies. "Default"
"ServiceTag"
"XffProxy"
vnetSubnetResourceId Virtual network resource id string
vnetTrafficTag (internal) Vnet traffic tag int

SiteLimits

Name Description Value
maxDiskSizeInMb Maximum allowed disk size usage in MB. int
maxMemoryInMb Maximum allowed memory usage in MB. int
maxPercentageCpu Maximum allowed CPU usage percentage. int

PushSettings

Name Description Value
kind Kind of resource. string
properties PushSettings resource specific properties PushSettingsProperties

PushSettingsProperties

Name Description Value
dynamicTagsJson Gets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint. string
isPushEnabled Gets or sets a flag indicating whether the Push endpoint is enabled. bool (required)
tagsRequiringAuth Gets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration endpoint.
Tags can consist of alphanumeric characters and the following:
'_', '@', '#', '.', ':', '-'.
Validation should be performed at the PushRequestHandler.
string
tagWhitelistJson Gets or sets a JSON string containing a list of tags that are allowed for use by the push registration endpoint. string

VirtualApplication

Name Description Value
physicalPath Physical path. string
preloadEnabled true if preloading is enabled; otherwise, false. bool
virtualDirectories Virtual directories for virtual application. VirtualDirectory[]
virtualPath Virtual path. string

VirtualDirectory

Name Description Value
physicalPath Physical path. string
virtualPath Path to virtual application. string