Description
stringlengths
19
200
IaC
stringlengths
128
8.16k
This template creates a Service Bus Namespace.
{"apiversion": "2018-01-01-preview", "name": "[parameters('servicebusnamespacename')]", "type": "microsoft.servicebus/namespaces", "location": "[parameters('location')]", "properties": {}, "resources": []}
This template creates a Service Bus namespace, and authorization rules for the namespace and a queue.
{"apiversion": "2018-01-01-preview", "name": "[parameters('servicebusnamespacename')]", "type": "microsoft.servicebus/namespaces", "location": "[parameters('location')]", "sku": {"name": "standard", "tier": "standard"}, "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('servicebusqueuename')]", "type": "queues", "dependson": ["[resourceid('microsoft.servicebus/namespaces/", parameters('servicebusnamespacename'))]"], "properties": {"lockduration": "pt5m", "maxsizeinmegabytes": "1024", "requiresduplicatedetection": "false", "requiressession": "false", "defaultmessagetimetolive": "p10675199dt2h48m5.4775807s", "deadletteringonmessageexpiration": "false", "duplicatedetectionhistorytimewindow": "pt10m", "maxdeliverycount": "10", "autodeleteonidle": "p10675199dt2h48m5.4775807s", "enablepartitioning": "false", "enableexpress": "false"}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('queueauthorizationrulename')]", "type": "authorizationrules", "dependson": ["[parameters('servicebusqueuename')]"], "properties": {"rights": ["listen"]}}]}]}{"apiversion": "2017-04-01", "name": "[variables('namespaceauthrulename')]", "type": "microsoft.servicebus/namespaces/authorizationrules", "dependson": ["[resourceid('microsoft.servicebus/namespaces/", parameters('servicebusnamespacename'))]"], "location": "[parameters('location')]", "properties": {"rights": ["send"]}}
This template creates a Service Bus queue and an Azure Scheduler job job that will post a message into the Service Bus queue at a regular interval.
{"name": "[variables('servicebusnamespacename')]", "type": "microsoft.servicebus/namespaces", "apiversion": "2021-01-01-preview", "location": "[parameters('location')]", "properties": {}, "resources": [{"name": "[parameters('queuename')]", "type": "queues", "apiversion": "2018-01-01-preview", "resources": [{"name": "[variables('queuesendonlykeyname')]", "type": "authorizationrules", "apiversion": "2018-01-01-preview", "properties": {"rights": ["send"]}, "dependson": ["[parameters('queuename')]"]}], "dependson": ["[variables('servicebusnamespacename')]"]}]}
This template creates a Service Bus namespace and a queue.
{"type": "microsoft.servicebus/namespaces", "apiversion": "2017-04-01", "name": "[parameters('servicebusnamespacename')]", "location": "[parameters('location')]", "sku": {"name": "standard"}, "properties": {}}{"type": "microsoft.servicebus/namespaces/queues", "apiversion": "2017-04-01", "name": "[format('{0}/{1}", parameters('servicebusnamespacename'), parameters('servicebusqueuename'))]", "properties": {"lockduration": "pt5m", "maxsizeinmegabytes": 1024, "requiresduplicatedetection": false, "requiressession": false, "defaultmessagetimetolive": "p10675199dt2h48m5.4775807s", "deadletteringonmessageexpiration": false, "duplicatedetectionhistorytimewindow": "pt10m", "maxdeliverycount": 10, "autodeleteonidle": "p10675199dt2h48m5.4775807s", "enablepartitioning": false, "enableexpress": false}, "dependson": ["[resourceid('microsoft.servicebus/namespaces", parameters('servicebusnamespacename'))]"]}
This template creates a vnet and a subnet hosting a Linux virtual machine that accesses a Service Bus namespace with a private endpoint.
{"apiversion": "2018-01-01-preview", "name": "[parameters('servicebusnamespacename')]", "type": "microsoft.servicebus/namespaces", "location": "[parameters('location')]", "sku": {"name": "premium", "tier": "premium", "capacity": "[parameters('servicebusnamespacecapacity')]"}, "properties": {"zoneredundant": "[parameters('servicebusnamespacezoneredundant')]"}}
This template creates a Service Bus Premium Namespace and a namespace AuthorizationRule
{"apiversion": "2018-01-01-preview", "name": "[parameters('premiumnamespacename')]", "type": "microsoft.servicebus/namespaces", "location": "[parameters('location')]", "kind": "messaging", "sku": {"name": "premium", "tier": "premium", "capacity": "[parameters('skucapacity')]"}, "properties": {"createacsnamespace": true}}{"apiversion": "2017-04-01", "name": "[variables('customsaskeyname')]", "type": "microsoft.servicebus/namespaces/authorizationrules", "dependson": ["[resourceid('microsoft.servicebus/namespaces/", parameters('premiumnamespacename'))]"], "location": "[parameters('location')]", "properties": {"rights": ["send", "listen", "manage"]}}
This template creates a Service Bus Namespace and Topic.
{"apiversion": "2018-01-01-preview", "name": "[parameters('servicebusnamespacename')]", "type": "microsoft.servicebus/namespaces", "location": "[parameters('location')]", "properties": {}, "resources": [{"apiversion": "2017-04-01", "name": "[parameters('servicebustopicname')]", "type": "topics", "dependson": ["[resourceid('microsoft.servicebus/namespaces/", parameters('servicebusnamespacename'))]"], "properties": {"path": "[parameters('servicebustopicname')]"}, "resources": []}]}
Create a cluster and a database
{"name": "[concat(parameters('clusters_kustocluster_name'), "/", parameters('databases_kustodb_name'))]", "type": "microsoft.kusto/clusters/databases", "apiversion": "2020-06-14", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.kusto/clusters", parameters('clusters_kustocluster_name'))]"], "properties": {"softdeleteperiodindays": 365, "hotcacheperiodindays": 31}}{"name": "[parameters('clusters_kustocluster_name')]", "type": "microsoft.kusto/clusters", "sku": {"name": "standard_d8_v3", "tier": "standard", "capacity": 2}, "apiversion": "2020-06-14", "location": "[parameters('location')]", "tags": {"created by": "github quickstart template"}}
Deploy Azure Data Explorer cluster into your VNet.
{"type": "microsoft.kusto/clusters", "sku": {"name": "[parameters('skuname')]", "tier": "[parameters('skutier')]"}, "name": "[parameters('clustername')]", "apiversion": "2020-06-14", "dependson": ["[variables('enginepublicipid')]", "[variables('datamanagementpublicipid')]", "[variables('vnetid')]"], "location": "[parameters('location')]", "properties": {"virtualnetworkconfiguration": {"subnetid": "[variables('subnetid')]", "enginepublicipid": "[variables('enginepublicipid')]", "datamanagementpublicipid": "[variables('datamanagementpublicipid')]"}}}
This template creates an Azure Machine Learning service workspace with public network connectivity.
{"type": "microsoft.machinelearningservices/workspaces", "apiversion": "2020-03-01", "identity": {"type": "systemassigned"}, "name": "[variables('workspacename')]", "location": "[parameters('location')]", "dependson": ["[variables('storageaccount')]", "[variables('keyvault')]", "[variables('applicationinsights')]", "[variables('containerregistry')]"], "properties": {"friendlyname": "[variables('workspacename')]", "storageaccount": "[variables('storageaccount')]", "keyvault": "[variables('keyvault')]", "applicationinsights": "[variables('applicationinsights')]", "containerregistry": "[variables('containerregistry')]", "hbiworkspace": "[parameters('hbi_workspace')]"}}
This template creates a ADLS datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datastores", "name": "[concat(parameters('workspacename'), "/", parameters('datastorename'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"datastoretype": "adls", "skipvalidation": "[parameters('skipvalidation')]", "clientid": "[parameters('clientid')]", "clientsecret": "[parameters('clientsecret')]", "storename": "[parameters('adlsstorename')]", "tenantid": "[parameters('tenantid')]", "resourceurl": "[parameters('resourceurl')]", "authorityurl": "[parameters('authorityurl')]", "adlssubscriptionid": "[parameters('adlsstoresubscriptionid')]", "adlsresourcegroup": "[parameters('adlsstoreresourcegroup')]"}}
This template creates a LinkedService in an existing Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/linkedservices", "apiversion": "2020-09-01-preview", "name": "[concat(parameters('amlworkspacename'), "/", parameters('linkname'))]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "properties": {"linkedserviceresourceid": "[parameters('synapseworkspaceresourceid')]"}}{"type": "microsoft.machinelearningservices/workspaces/computes", "apiversion": "2018-11-19", "name": "[concat(parameters('amlworkspacename'), "/", parameters('sparkpools')[copyindex()].computename)]", "location": "[parameters('location')]", "copy": {"name": "poolcopy", "count": "[length(parameters('sparkpools'))]"}, "properties": {"resourceid": "[resourceid(reference(parameters('synapseworkspaceresourceid'), "2019-06-01-preview", "full').subscriptionid, reference(parameters('synapseworkspaceresourceid'), "2019-06-01-preview", "full').resourcegroupname, "microsoft.synapse/workspaces/bigdatapools", variables('synapseworkspacename'), parameters('sparkpools')[copyindex()].poolname)]", "computetype": "synapsespark"}}
This template creates a file share datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datastores", "name": "[concat(parameters('workspacename'), "/", parameters('datastorename'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"datastoretype": "file", "skipvalidation": "[parameters('skipvalidation')]", "accountname": "[parameters('storageaccountname')]", "sharename": "[parameters('filesharename')]", "accountkey": "[if(equals(parameters('authenticationtype'), "account key'), parameters('sastokenoraccountkey'), json('null'))]", "sastoken": "[if(equals(parameters('authenticationtype'), "sas token'), parameters('sastokenoraccountkey'), json('null'))]"}}
This template creates a ADLS Gen2 datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datastores", "name": "[concat(parameters('workspacename'), "/", parameters('datastorename'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"datastoretype": "adls-gen2", "skipvalidation": "[parameters('skipvalidation')]", "clientid": "[parameters('clientid')]", "clientsecret": "[parameters('clientsecret')]", "filesystem": "[parameters('filesystem')]", "accountname": "[parameters('accountname')]", "tenantid": "[parameters('tenantid')]", "resourceurl": "[parameters('resourceurl')]", "authorityurl": "[parameters('authorityurl')]", "subscriptionid": "[parameters('storageaccountsubscriptionid')]", "resourcegroupname": "[parameters('storageaccountresourcegroup')]"}}
This template creates an Azure Machine Learning service workspace with public network connectivity.
{"type": "microsoft.machinelearningservices/workspaces", "apiversion": "2020-03-01", "identity": {"type": "systemassigned"}, "name": "[variables('workspacename')]", "location": "[parameters('location')]", "dependson": ["[variables('storageaccount')]", "[variables('keyvault')]", "[variables('applicationinsights')]", "[variables('containerregistry')]"], "properties": {"friendlyname": "[variables('workspacename')]", "storageaccount": "[variables('storageaccount')]", "keyvault": "[variables('keyvault')]", "applicationinsights": "[variables('applicationinsights')]", "containerregistry": "[variables('containerregistry')]", "hbiworkspace": "[parameters('hbi_workspace')]", "encryption": {"status": "[parameters('encryption_status')]", "keyvaultproperties": {"keyvaultarmid": "[parameters('cmk_keyvault_id')]", "keyidentifier": "[parameters('cmk_keyvault_key_uri')]"}}}}
This template creates a Machine Learning Service HDInsight cluster
{"type": "microsoft.machinelearningservices/workspaces/computes", "apiversion": "2020-01-01", "name": "[concat(parameters('workspacename'), "/", parameters('computename'))]", "location": "[parameters('location')]", "properties": {"computetype": "hdinsight", "resourceid": "[resourceid('microsoft.hdinsight/clusters", parameters('clustername'))]", "properties": {"sshport": "[parameters('sshport')]", "administratoraccount": {"username": "[parameters('username')]", "password": "[parameters('password')]"}}}}
This template creates a tabular dataset from Web URL in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datasets", "name": "[concat(parameters('workspacename'), "/", parameters('datasetname'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"skipvalidation": "[parameters('skipvalidation')]", "datasettype": "tabular", "parameters": {"header": "[parameters('header')]", "includepath": "[parameters('includepath')]", "path": {"httpurl": "[parameters('httpurl')]"}, "separator": "[parameters('separator')]", "sourcetype": "[parameters('sourcetype')]"}, "registration": {"description": "[parameters('datasetdescription')]", "tags": "[parameters('tags')]"}, "timeseries": {"finegraintimestamp": "[parameters('finegraintimestamp')]", "coarsegraintimestamp": "[parameters('coarsegraintimestamp')]"}}}
This template creates a SQL datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datastores", "name": "[concat(parameters('workspacename'), "/", parameters('datastorename'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"datastoretype": "sqldb", "skipvalidation": "[parameters('skipvalidation')]", "databasename": "[parameters('databasename')]", "servername": "[parameters('sqlservername')]", "username": "[if(equals(parameters('authenticationtype'), "sql authentication'), parameters('usernameorclientid'), json('null'))]", "password": "[if(equals(parameters('authenticationtype'), "sql authentication'), parameters('passwordorclientsecret'), json('null'))]", "tenantid": "[if(equals(parameters('authenticationtype'), "service principal'), parameters('tenantid'), json('null'))]", "clientid": "[if(equals(parameters('authenticationtype'), "service principal'), parameters('usernameorclientid'), json('null'))]", "clientsecret": "[if(equals(parameters('authenticationtype'), "service principal'), parameters('passwordorclientsecret'), json('null'))]", "authorityurl": "[parameters('authorityurl')]", "resourceurl": "[parameters('resourceurl')]", "endpoint": "[parameters('endpoint')]"}}
This template creates a tabular dataset from SQL query in SQL/PostgreSQL/MySQL datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datasets", "name": "[concat(parameters('workspacename'), "/", parameters('datasetname'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"skipvalidation": "[parameters('skipvalidation')]", "datasettype": "tabular", "parameters": {"query": {"query": "[parameters('sqlquery')]", "datastorename": "[parameters('datastorename')]"}, "sourcetype": "sql_query"}, "registration": {"description": "[parameters('datasetdescription')]", "tags": "[parameters('tags')]"}, "timeseries": {"finegraintimestamp": "[parameters('finegraintimestamp')]", "coarsegraintimestamp": "[parameters('coarsegraintimestamp')]"}}}
This template creates an Azure Machine Learning service.
{"type": "microsoft.machinelearningservices/workspaces/services", "apiversion": "2020-05-01-preview", "name": "[concat(parameters('workspacename'), "/", parameters('webservicename'))]", "location": "[parameters('location')]", "properties": {"environmentimagerequest": {"models": "[ variables('models')]", "driverprogram": "[if(empty(variables('driverprogramfilename')), json('null'), variables('driverprogramfilename'))]", "assets": "[if(empty(variables('driverprogramfilename')), json('null'), variables('assets'))]", "environmentreference": "[if(not(or(empty(parameters('environmentname')), empty(parameters('environmentversion')))), createobject('name", parameters('environmentname'), "version", parameters('environmentversion')), json('null'))]"}, "scoringtimeoutms": "[parameters('scoringtimeoutmilliseconds')]", "appinsightsenabled": "[parameters('appinsightsenabled')]", "authenabled": "[parameters('authenabled')]", "aadauthenabled": "[parameters('tokenauthenabled')]", "keys": "[if(not(or(empty(parameters('primarykey')), empty(parameters('secondarykey')))), createobject('primarykey", parameters('primarykey'), "secondarykey", parameters('secondarykey')), json('null'))]", "containerresourcerequirements": {"cpu": "[parameters('cpu')]", "cpulimit": "[parameters('cpulimit')]", "gpu": "[parameters('gpu')]", "memoryingb": "[parameters('memoryingb')]"}, "computetype": "aci"}}
This template creates a Machine Learning Service DSVM Compute.
{"type": "microsoft.machinelearningservices/workspaces/computes", "apiversion": "2021-04-01", "name": "[concat(parameters('workspacename'), "/", parameters('computename'))]", "location": "[parameters('location')]", "properties": {"computetype": "virtualmachine", "resourceid": "[resourceid('microsoft.compute/virtualmachines", parameters('vmname'))]", "properties": {"sshport": "[parameters('sshport')]", "administratoraccount": {"username": "[parameters('username')]", "password": "[parameters('password')]"}}}}
This template creates a file dataset from Web URL in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datasets", "name": "[concat(parameters('workspacename'), "/", parameters('datasetname'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"skipvalidation": "[parameters('skipvalidation')]", "datasettype": "file", "parameters": {"path": {"httpurl": "[parameters('httpurl')]"}}, "registration": {"description": "[parameters('datasetdescription')]", "tags": "[parameters('tags')]"}}}
This template creates an AKS compute target in AML with a private IP address.
{"type": "microsoft.machinelearningservices/workspaces", "apiversion": "2021-04-01", "name": "[parameters('workspacename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]", "[resourceid('microsoft.keyvault/vaults", variables('keyvaultname'))]", "[resourceid('microsoft.insights/components", variables('applicationinsightsname'))]", "[resourceid('microsoft.containerregistry/registries", variables('containerregistryname'))]"], "identity": {"type": "systemassigned"}, "properties": {"friendlyname": "[parameters('workspacename')]", "keyvault": "[resourceid('microsoft.keyvault/vaults",variables('keyvaultname'))]", "applicationinsights": "[resourceid('microsoft.insights/components",variables('applicationinsightsname'))]", "containerregistry": "[resourceid('microsoft.containerregistry/registries",variables('containerregistryname'))]", "storageaccount": "[resourceid('microsoft.storage/storageaccounts/",variables('storageaccountname'))]"}}{"type": "microsoft.machinelearningservices/workspaces/computes", "apiversion": "2021-04-01", "name": "[concat(parameters('workspacename'),"/compute-with-ilb')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.machinelearningservices/workspaces", parameters('workspacename'))]"], "properties": {"computetype": "aks", "computelocation": "[parameters('location')]", "properties": {"agentvmsize": "[parameters('vmsize')]", "agentcount": "[parameters('agentcount')]", "loadbalancertype": "internalloadbalancer"}}}
This template creates a Machine Learning Service Aks Compute.
{"type": "microsoft.machinelearningservices/workspaces/computes", "apiversion": "2021-01-01", "name": "[concat(parameters('workspacename'), "/", parameters('computename'))]", "location": "[parameters('location')]", "properties": {"computetype": "aks", "resourceid": "[resourceid('microsoft.containerservice/managedclusters", parameters('clustername'))]"}}
This template creates an Azure Machine Learning service.
{"type": "microsoft.machinelearningservices/workspaces/services", "apiversion": "2020-05-01-preview", "name": "[concat(parameters('workspacename'), "/", parameters('webservicename'))]", "location": "[parameters('location')]", "properties": {"environmentimagerequest": {"models": "[ variables('models')]", "driverprogram": "[if(empty(variables('driverprogramfilename')), json('null'), variables('driverprogramfilename'))]", "assets": "[if(empty(variables('driverprogramfilename')), json('null'), variables('assets'))]", "environmentreference": "[if(not(or(empty(parameters('environmentname')), empty(parameters('environmentversion')))), createobject('name", parameters('environmentname'), "version", parameters('environmentversion')), json('null'))]"}, "scoringtimeoutms": "[parameters('scoringtimeoutmilliseconds')]", "appinsightsenabled": "[parameters('appinsightsenabled')]", "authenabled": "[parameters('authenabled')]", "aadauthenabled": "[parameters('tokenauthenabled')]", "keys": "[if(not(or(empty(parameters('primarykey')), empty(parameters('secondarykey')))), createobject('primarykey", parameters('primarykey'), "secondarykey", parameters('secondarykey')), json('null'))]", "containerresourcerequirements": {"cpu": "[parameters('cpu')]", "cpulimit": "[parameters('cpulimit')]", "gpu": "[parameters('gpu')]", "memoryingb": "[parameters('memoryingb')]"}, "computetype": "aks", "computename": "[parameters('computetarget')]", "numreplicas": "[parameters('numreplicas')]", "autoscaler": "[if(parameters('autoscaleenabled'), createobject('autoscaleenabled", parameters('autoscaleenabled'), "minreplicas", int(parameters('autoscaleminreplicas')), "maxreplicas", int(parameters('autoscalemaxreplicas')), "targetutilization", int(parameters('autoscaletargetutilization')), "refreshperiodinseconds", int(parameters('autoscalerefreshseconds'))), json('null'))]", "namespace": "[parameters('namespace')]", "livenessproberequirements": "[createobject('periodseconds", parameters('periodseconds'), "initialdelayseconds", parameters('initialdelayseconds'), "timeoutseconds" , parameters('timeoutseconds'), "failurethreshold", parameters('failurethreshold'), "successthreshold", parameters('successthreshold'))]"}}
This template creates an Azure Machine Learning service workspace while allowing for various security configuraitons.
{"type": "microsoft.machinelearningservices/workspaces", "apiversion": "2020-09-01-preview", "name": "[parameters('workspacename')]", "location": "[parameters('location')]", "identity": {"type": "[parameters('identitytype')]", "userassignedidentities": "[if(or(equals(parameters('identitytype'), "userassigned'), equals(parameters('identitytype'), "systemassigned,userassigned')), variables('userassignedidentities'), json('null'))]"}, "dependson": ["[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]", "[resourceid('microsoft.keyvault/vaults", parameters('keyvaultname'))]", "[resourceid('microsoft.insights/components", parameters('applicationinsightsname'))]", "[resourceid('microsoft.containerregistry/registries", parameters('containerregistryname'))]"], "tags": "[parameters('tagvalues')]", "properties": {"friendlyname": "[parameters('workspacename')]", "storageaccount": "[variables('storageaccount')]", "keyvault": "[variables('keyvault')]", "applicationinsights": "[variables('applicationinsights')]", "containerregistry": "[if(not(equals(parameters('containerregistryoption'), "none')), variables('containerregistry'), json('null'))]", "adbworkspace": "[if(empty(parameters('adbworkspace')), json('null'), parameters('adbworkspace'))]", "primaryuserassignedidentity": "[if(equals(parameters('identitytype'), "userassigned'), variables('primaryuserassignedidentity'), json('null'))]", "encryption": {"status": "[parameters('encryption_status')]", "identity": "[variables('encryptionidentity')]", "keyvaultproperties": {"keyvaultarmid": "[parameters('cmk_keyvault')]", "keyidentifier": "[parameters('resource_cmk_uri')]"}, "cosmosdbarmid": "[parameters('encryption_cosmosdb_armid')]", "storageaccountarmid": "[parameters('encryption_storage_armid')]", "searchaccountarmid": "[parameters('encryption_search_armid')]"}, "hbiworkspace": "[parameters('confidential_data')]"}}
This template creates an Azure Machine Learning aks compute.
{"type": "microsoft.machinelearningservices/workspaces/computes", "apiversion": "2021-01-01", "name": "[concat(parameters('workspacename'), "/", parameters('computename'))]", "location": "[parameters('location')]", "properties": {"computetype": "aks", "properties": {"agentvmsize": "[parameters('agentvmsize')]", "agentcount": "[parameters('agentcount')]", "sslconfiguration": "[if(equals(parameters('sslstatus'),"disabled'), json('null'), variables('sslconfiguration'))]", "aksnetworkingconfiguration": "[if(and(not(empty(parameters('vnetresourcegroupname'))),not(empty(parameters('vnetname'))),not(empty(parameters('subnetname'))),not(empty(parameters('servicecidr'))),not(empty(parameters('dnsserviceip'))),not(empty(parameters('dockerbridgecidr')))), variables('aksnetworkingconfiguration'), json('null'))]"}}}
This template creates a Databricks File System datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datastores", "name": "[concat(parameters('workspacename'), "/", parameters('datastorename'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"datastoretype": "dbfs", "skipvalidation": "[parameters('skipvalidation')]"}}
This template creates a MySQL datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datastores", "name": "[concat(parameters('workspacename'), "/", parameters('datastorename'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"datastoretype": "mysqldb", "skipvalidation": "[parameters('skipvalidation')]", "databasename": "[parameters('databasename')]", "password": "[parameters('password')]", "servername": "[parameters('servername')]", "userid": "[parameters('userid')]", "port": "[parameters('port')]", "endpoint": "[parameters('endpoint')]"}}
This template creates a file dataset from relative path in datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datasets", "name": "[concat(parameters('workspacename'), "/", parameters('datasetname'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"skipvalidation": "[parameters('skipvalidation')]", "datasettype": "file", "parameters": {"path": {"datapath": {"relativepath": "[parameters('relativepath')]", "datastorename": "[parameters('datastorename')]"}}}, "registration": {"description": "[parameters('datasetdescription')]", "tags": "[parameters('tags')]"}}}
This template creates an Azure Machine Learning compute cluster.
{"type": "microsoft.machinelearningservices/workspaces/computes", "name": "[concat(parameters('workspacename'), "/", parameters('clustername'))]", "apiversion": "2021-01-01", "location": "[parameters('location')]", "properties": {"computetype": "amlcompute", "properties": {"vmsize": "[parameters('vmsize')]", "scalesettings": {"minnodecount": "[parameters('minnodecount')]", "maxnodecount": "[parameters('maxnodecount')]"}, "useraccountcredentials": {"adminusername": "[parameters('adminusername')]", "adminuserpassword": "[parameters('adminuserpassword')]"}, "subnet": "[if(and(not(empty(parameters('vnetresourcegroupname'))),not(empty(parameters('vnetname'))),not(empty(parameters('subnetname')))), variables('subnet'), json('null'))]"}}}
This template creates a tabular dataset from relative path in datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datasets", "name": "[concat(parameters('workspacename'), "/", parameters('datasetname'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"skipvalidation": "[parameters('skipvalidation')]", "datasettype": "tabular", "parameters": {"header": "[parameters('header')]", "includepath": "[parameters('includepath')]", "partitionformat": "[parameters('partitionformat')]", "path": {"datapath": {"relativepath": "[parameters('relativepath')]", "datastorename": "[parameters('datastorename')]"}}, "separator": "[parameters('separator')]", "sourcetype": "[parameters('sourcetype')]"}, "registration": {"description": "[parameters('datasetdescription')]", "tags": "[parameters('tags')]"}, "timeseries": {"finegraintimestamp": "[parameters('finegraintimestamp')]", "coarsegraintimestamp": "[parameters('coarsegraintimestamp')]"}}}
This template creates a blob storage datastore in Azure Machine Learning workspace.
{"type": "microsoft.machinelearningservices/workspaces/datastores", "name": "[concat(parameters('workspacename'), "/", parameters('datastorename'))]", "apiversion": "2020-05-01-preview", "location": "[parameters('location')]", "properties": {"datastoretype": "blob", "skipvalidation": "[parameters('skipvalidation')]", "accountname": "[parameters('storageaccountname')]", "containername": "[parameters('containername')]", "accountkey": "[if(equals(parameters('authenticationtype'), "account key'), parameters('sastokenoraccountkey'), json('null'))]", "sastoken": "[if(equals(parameters('authenticationtype'), "sas token'), parameters('sastokenoraccountkey'), json('null'))]", "storageaccountsubscriptionid": "[parameters('storageaccountsubscriptionid')]", "storageaccountresourcegroup": "[parameters('storageaccountresourcegroup')]"}}
This template creates a Machine Learning Service ADLA Compute.
{"type": "microsoft.machinelearningservices/workspaces/computes", "apiversion": "2018-11-19", "name": "[concat(parameters('workspacename'), "/", parameters('computename'))]", "location": "[parameters('location')]", "properties": {"computetype": "datalakeanalytics", "resourceid": "[resourceid('microsoft.datalakeanalytics/accounts", parameters('adlanalyticsname'))]"}}
Creating a Azure SignalR Service using a template.
{"type": "microsoft.signalrservice/signalr", "apiversion": "2020-07-01-preview", "name": "[parameters('name')]", "location": "[parameters('location')]", "sku": {"capacity": "[parameters('capacity')]", "name": "[parameters('pricingtier')]"}, "kind": "signalr", "identity": {"type": "systemassigned"}, "properties": {"tls": {"clientcertenabled": false}, "features": [{"flag": "servicemode", "value": "[parameters('servicemode')]"}, {"flag": "enableconnectivitylogs", "value": "[parameters('enableconnectivitylogs')]"}, {"flag": "enablemessaginglogs", "value": "[parameters('enablemessaginglogs')]"}, {"flag": "enablelivetrace", "value": "[parameters('enablelivetrace')]"}], "cors": {"allowedorigins": "[parameters('allowedorigins')]"}, "networkacls": {"defaultaction": "deny", "publicnetwork": {"allow": ["clientconnection"]}, "privateendpoints": [{"name": "mysignalrservice.1fa229cd-bf3f-47f0-8c49-afb36723997e", "allow": ["serverconnection"]}]}, "upstream": {"templates": [{"categorypattern": "*", "eventpattern": "connect,disconnect", "hubpattern": "*", "urltemplate": "https://example.com/chat/api/connect"}]}}}
This template creates an IOT Hub and Virtual Machine Ubuntu edge simulator, using Azure IoT Edge.
{"type": "microsoft.devices/iothubs", "apiversion": "2020-03-01", "name": "[parameters('iothubname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skuunits')]"}, "properties": {}}{"type": "microsoft.devices/provisioningservices", "apiversion": "2020-01-01", "name": "[parameters('provisioningservicename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skuunits')]"}, "dependson": ["[parameters('iothubname')]"], "properties": {"iothubs": [{"connectionstring": "[concat('hostname=https://", parameters('iothubname'), parameters('iothubdomain'), ";sharedaccesskeyname=", variables('iothubkeyname'), ";sharedaccesskey=", listkeys(resourceid('microsoft.devices/iothubs/iothubkeys", parameters('iothubname'), variables('iothubkeyname')), "2020-03-01').primarykey)]", "location": "[parameters('location')]", "name": "[concat('https://", parameters('iothubname'), parameters('iothubdomain'))]"}]}}
This template creates an IoT Hub and a storage account and shows automatic routing.
{"type": "microsoft.devices/iothubs", "apiversion": "2021-03-31", "name": "[variables('iothubname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"], "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skuunits')]"}, "properties": {"eventhubendpoints": {"events": {"retentiontimeindays": 1, "partitioncount": "[parameters('d2cpartitions')]"}}, "routing": {"endpoints": {"storagecontainers": [{"connectionstring": "[concat('defaultendpointsprotocol=https;accountname=",variables('storageaccountname'),";endpointsuffix=",environment().suffixes.storage,";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-02-01').keys[0].value)]", "containername": "[variables('storagecontainername')]", "filenameformat": "{iothub}/{partition}/{yyyy}/{mm}/{dd}/{hh}/{mm}", "batchfrequencyinseconds": 100, "maxchunksizeinbytes": 104857600, "encoding": "json", "name": "[variables('storageendpoint')]"}]}, "routes": [{"name": "contosostorageroute", "source": "devicemessages", "condition": "level="storage"", "endpointnames": ["[variables('storageendpoint')]"], "isenabled": true}], "fallbackroute": {"name": "$fallback", "source": "devicemessages", "condition": "true", "endpointnames": ["events"], "isenabled": true}}, "messagingendpoints": {"filenotifications": {"lockdurationasiso8601": "pt1m", "ttlasiso8601": "pt1h", "maxdeliverycount": 10}}, "enablefileuploadnotifications": false, "cloudtodevice": {"maxdeliverycount": 10, "defaultttlasiso8601": "pt1h", "feedback": {"lockdurationasiso8601": "pt1m", "ttlasiso8601": "pt1h", "maxdeliverycount": 10}}}}
This template creates an IoT hub and an IoT Hub Device Provisioning Service, and link the two services together.
{"type": "microsoft.devices/iothubs", "apiversion": "2021-03-31", "name": "[parameters('iothubname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skuunits')]"}, "properties": {}}{"type": "microsoft.devices/provisioningservices", "apiversion": "2020-03-01", "name": "[parameters('provisioningservicename')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skuunits')]"}, "dependson": ["[parameters('iothubname')]"], "properties": {"iothubs": [{"connectionstring": "[concat('hostname=", reference(resourceid('microsoft.devices/iothubs", parameters('iothubname'))).hostname, ";sharedaccesskeyname=", variables('iothubkeyname'), ";sharedaccesskey=", listkeys(resourceid('microsoft.devices/iothubs/iothubkeys", parameters('iothubname'), variables('iothubkeyname')), "2020-03-01').primarykey)]", "location": "[parameters('location')]", "name": "[reference(resourceid('microsoft.devices/iothubs", parameters('iothubname'))).hostname]"}]}}
Provision an Azure Cognitive Search service
{"type": "microsoft.search/searchservices", "apiversion": "2020-08-01", "name": "[parameters('name')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}, "properties": {"replicacount": "[parameters('replicacount')]", "partitioncount": "[parameters('partitioncount')]", "hostingmode": "[parameters('hostingmode')]"}}
Deploy an App Service that supports Python. It gives you the support to deploy your own Flask app.
{"apiversion": "2020-06-01", "name": "[parameters('webappname')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]"], "properties": {"name": "[parameters('webappname')]", "siteconfig": {"linuxfxversion": "[variables('linuxfxversion')]", "alwayson": "[variables('alwayson')]"}, "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "clientaffinityenabled": false}}{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "kind": "linux", "properties": {"name": "[variables('hostingplanname')]", "workersize": "[variables('workersize')]", "workersizeid": "[variables('workersizeid')]", "numberofworkers": "[variables('numberofworkers')]", "reserved": true}, "sku": {"tier": "[variables('sku')]", "name": "[variables('skucode')]"}}
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.
{"comments": "this is the airflow linux web app running puckel/docker-airflow docker image", "type": "microsoft.web/sites", "name": "[parameters('sitename')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["[variables('hostingplanname')]", "[variables('databasename')]"], "properties": {"siteconfig": {"linuxfxversion": "docker|puckel/docker-airflow:latest"}, "name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "resources": [{"name": "appsettings", "type": "config", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.web/sites", parameters('sitename'))]"], "tags": {"displayname": "airflowappsettings"}, "comments": "this are the generated settings for the airflow sql alchemy connectionstring", "properties": {"airflow__core__sql_alchemy_conn": "[concat('postgresql://", variables('airflowusername'),":",parameters('administratorloginpassword'),"@",reference(resourceid('microsoft.dbforpostgresql/servers",variables('servername'))).fullyqualifieddomainname,":5432/",variables('databasename'))]", "airflow__core__load_examples": "true", "websites_enable_app_service_storage": "true"}}]}{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "properties": {"name": "[variables('hostingplanname')]", "workersizeid": "1", "reserved": true, "numberofworkers": "1"}, "sku": {"tier": "[parameters('serviceplantier')]", "name": "[parameters('serviceplansku')]"}, "kind": "linux"}
This template Creates an Azure App Service Environment inside A Virtual Network Subnet. This template also adds a Azure Web App inside the App Service Environment.
{"apiversion": "2019-08-01", "type": "microsoft.web/hostingenvironments", "name": "[variables('ase-name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('ase-vnet-name'))]"], "tags": {"[concat('hidden-related:", resourceid('microsoft.web/serverfarms", variables('ase-service-name')))]": "resource", "[concat('hidden-related:", resourceid('microsoft.web/sites", variables('ase-web-app-name')))]": "resource", "displayname": "ase"}, "properties": {"name": "[variables('ase-name')]", "location": "[parameters('location')]", "ipssladdresscount": "[parameters('ase-ipssladdresscount')]", "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('ase-vnet-name'), variables('ase-vnetsubnet1name'))]"}, "multisize": "[parameters('ase-frontendsize')]", "multirolecount": "[parameters('ase-frontendcount')]", "workerpools": [{"workersizeid": 0, "workersize": "[parameters('ase-workerpooloneinstancesize')]", "workercount": "[parameters('ase-workerpooloneinstancecount')]"}, {"workersizeid": 1, "workersize": "[parameters('ase-workerpooltwoinstancesize')]", "workercount": "[parameters('ase-workerpooltwoinstancecount')]"}, {"workersizeid": 2, "workersize": "[parameters('ase-workerpoolthreeinstancesize')]", "workercount": "[parameters('ase-workerpoolthreeinstancecount')]"}]}}{"name": "[variables('ase-service-name')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "apiversion": "2019-08-01", "dependson": ["[resourceid('microsoft.web/hostingenvironments", variables('ase-name'))]"], "tags": {"displayname": "ase-app-service-app"}, "properties": {"name": "[variables('ase-service-name')]", "hostingenvironment": "[variables('ase-name')]", "hostingenvironmentid": "[resourceid('microsoft.web/hostingenvironments", variables('ase-name'))]"}, "sku": {"name": "[concat('p", parameters('ase-app-service-workerpool'))]", "tier": "premium", "size": "[concat('p", parameters('ase-app-service-workerpool'))]", "family": "p", "capacity": "[parameters('ase-app-service-numberofworkersfromworkerpool')]"}}{"name": "[variables('ase-web-app-name')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "apiversion": "2019-08-01", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('ase-service-name'))]"], "tags": {"[concat('hidden-related:", resourceid('microsoft.web/serverfarms", variables('ase-service-name')))]": "resource", "displayname": "ase-web-app"}, "properties": {"name": "[variables('ase-web-app-name')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('ase-service-name'))]", "hostingenvironment": "[variables('ase-name')]", "hostingenvironmentid": "[resourceid('microsoft.web/hostingenvironments", variables('ase-name'))]"}}
Install a Public Certificate in App Service
{"apiversion": "2020-10-01", "name": "[concat(parameters('exisitngwebappname'), "/", variables('publiccertificatename'))]", "type": "microsoft.web/sites/publiccertificates", "location": "[parameters('location')]", "properties": {"publiccertificatelocation": "[parameters('publiccertificatelocation')]", "blob": "[parameters('blob')]"}}
It allows you to deploy an App Service Plan and a Windows app
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('appserviceplanportalname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('webappname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('appserviceplanportalname'))]"], "properties": {"siteconfig": "[variables('configreference')[parameters('language')]]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanportalname'))]"}, "resources": [{"condition": "[contains(variables('gitrepourl'),"http')]", "type": "sourcecontrols", "apiversion": "2020-06-01", "name": "web", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('webappname'))]"], "properties": {"repourl": "[variables('gitrepourl')]", "branch": "master", "ismanualintegration": true}}]}
Provision a function app on a dedicated hosting plan
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}, "properties": {"name": "[variables('hostingplanname')]", "workersize": "[parameters('workersize')]", "numberofworkers": 1}}{"apiversion": "2020-06-01", "type": "microsoft.web/sites", "name": "[variables('functionappname')]", "location": "[parameters('location')]", "kind": "functionapp", "properties": {"name": "[variables('functionappname')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "clientaffinityenabled": false, "siteconfig": {"alwayson": true}}, "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"], "resources": [{"apiversion": "2018-11-01", "name": "appsettings", "type": "config", "dependson": ["[resourceid('microsoft.web/sites", variables('functionappname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"], "properties": {"azurewebjobsstorage": "[concat('defaultendpointsprotocol=https;accountname=", variables('storageaccountname'), ";endpointsuffix=", environment().suffixes.storage, ";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value)]", "appinsights_instrumentationkey": "[reference(resourceid('microsoft.insights/components", variables('applicationinsightsname')), "2020-02-02-preview').instrumentationkey]", "functions_extension_version": "~3"}}]}
Create a Container App Environment with a basic Container App. It also deploys a Log Analytics Workspace to store logs.
{"type": "microsoft.web/kubeenvironments", "apiversion": "2021-02-01", "name": "[parameters('containerappenvname')]", "location": "[parameters('location')]", "kind": "containerenvironment", "properties": {"type": "managed", "internalloadbalancerenabled": false, "applogsconfiguration": {"destination": "log-analytics", "loganalyticsconfiguration": {"customerid": "[reference(resourceid('microsoft.operationalinsights/workspaces", parameters('containerapploganalyticsname'))).customerid]", "sharedkey": "[listkeys(resourceid('microsoft.operationalinsights/workspaces", parameters('containerapploganalyticsname')), "2020-10-01').primarysharedkey]"}}}, "dependson": ["[resourceid('microsoft.operationalinsights/workspaces", parameters('containerapploganalyticsname'))]"]}{"type": "microsoft.web/containerapps", "apiversion": "2021-03-01", "name": "[parameters('containerappname')]", "location": "[parameters('location')]", "properties": {"kubeenvironmentid": "[resourceid('microsoft.web/kubeenvironments", parameters('containerappenvname'))]", "configuration": {"ingress": {"external": true, "targetport": "[parameters('targetport')]", "allowinsecure": false, "traffic": [{"latestrevision": true, "weight": 100}]}}, "template": {"revisionsuffix": "firstrevision", "containers": [{"name": "[parameters('containerappname')]", "image": "[parameters('containerimage')]", "resources": {"cpu": "[parameters('cpucore')]", "memory": "[format('{0}gi", parameters('memorysize'))]"}}], "scale": {"minreplica": "[parameters('minreplica')]", "maxreplica": "[parameters('maxreplica')]"}}}, "dependson": ["[resourceid('microsoft.web/kubeenvironments", parameters('containerappenvname'))]"]}
Deploy two web apps and connect it securely with Private Endpoint and VNet injection
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[parameters('serverfarmname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('skuname')]", "tier": "[variables('sku_tier')]", "size": "[parameters('skusize')]", "family": "[parameters('skufamily')]", "capacity": 1}, "kind": "app"}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('site1_name')]", "location": "[parameters('location')]", "kind": "app", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('serverfarmname'))]"}, "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('serverfarmname'))]"]}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('site2_name')]", "location": "[parameters('location')]", "kind": "app", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('serverfarmname'))]"}, "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('serverfarmname'))]"]}{"type": "microsoft.web/sites/config", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('site2_name'), "appsettings')]", "properties": {"website_dns_server": "168.63.129.16", "website_vnet_route_all": "1"}, "dependson": ["[resourceid('microsoft.web/sites", parameters('site2_name'))]"]}{"type": "microsoft.web/sites/config", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('site1_name'), "web')]", "properties": {"ftpsstate": "allallowed"}, "dependson": ["[resourceid('microsoft.web/sites", parameters('site1_name'))]"]}{"type": "microsoft.web/sites/config", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('site2_name'), "web')]", "properties": {"ftpsstate": "allallowed"}, "dependson": ["[resourceid('microsoft.web/sites", parameters('site2_name'))]"]}{"type": "microsoft.web/sites/hostnamebindings", "apiversion": "2019-08-01", "name": "[format('{0}/{1}", parameters('site1_name'), format('{0}{1}", parameters('site1_name'), variables('webapp_dns_name')))]", "properties": {"sitename": "[parameters('site1_name')]", "hostnametype": "verified"}, "dependson": ["[resourceid('microsoft.web/sites", parameters('site1_name'))]"]}{"type": "microsoft.web/sites/hostnamebindings", "apiversion": "2019-08-01", "name": "[format('{0}/{1}", parameters('site2_name'), format('{0}{1}", parameters('site2_name'), variables('webapp_dns_name')))]", "properties": {"sitename": "[parameters('site2_name')]", "hostnametype": "verified"}, "dependson": ["[resourceid('microsoft.web/sites", parameters('site2_name'))]"]}{"type": "microsoft.web/sites/networkconfig", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('site2_name'), "virtualnetwork')]", "properties": {"subnetresourceid": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('subnet2name'))]"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", parameters('virtualnetworkname'))]", "[resourceid('microsoft.web/sites", parameters('site2_name'))]"]}
This template provides a easy way to deploy Web App on Linux with Azure database for PostgreSQL
{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "properties": {"name": "[variables('hostingplanname')]", "workersize": "1", "numberofworkers": 0}, "sku": {"tier": "standard", "name": "s1"}}{"apiversion": "2018-11-01", "name": "[parameters('sitename')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"], "properties": {"name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "resources": [{"apiversion": "2018-11-01", "name": "connectionstrings", "type": "config", "dependson": ["[resourceid('microsoft.web/sites", parameters('sitename'))]"], "properties": {"defaultconnection": {"value": "[concat('database=", variables('databasename'), ";server=", reference(resourceid('microsoft.dbforpostgresql/servers",variables('servername'))).fullyqualifieddomainname, ";user id=", parameters('administratorlogin'),"@", variables('servername'),";password=", parameters('administratorloginpassword'))]", "type": "postgresql"}}}]}
Provision a function app that runs on a Consumption (dynamic hosting) plan
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"name": "y1", "tier": "dynamic"}, "properties": {"name": "[variables('hostingplanname')]", "computemode": "dynamic"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[variables('functionappname')]", "location": "[parameters('location')]", "kind": "functionapp", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"], "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "siteconfig": {"appsettings": [{"name": "azurewebjobsstorage", "value": "[concat('defaultendpointsprotocol=https;accountname=", variables('storageaccountname'), ";endpointsuffix=", environment().suffixes.storage, ";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "website_contentazurefileconnectionstring", "value": "[concat('defaultendpointsprotocol=https;accountname=", variables('storageaccountname'), ";endpointsuffix=", environment().suffixes.storage, ";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "website_contentshare", "value": "[tolower(variables('functionappname'))]"}, {"name": "functions_extension_version", "value": "~2"}, {"name": "website_node_default_version", "value": "~10"}, {"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components", variables('applicationinsightsname')), "2020-02-02-preview').instrumentationkey]"}, {"name": "functions_worker_runtime", "value": "[variables('functionworkerruntime')]"}]}}}
App Service Environment v2 - ILB with Hosting Plan and Azure WebApp
{"type": "microsoft.web/hostingenvironments", "apiversion": "2020-12-01", "name": "[parameters('asename')]", "kind": "asev2", "location": "[parameters('location')]", "tags": {"displayname": "ase environment", "usage": "hosting paas applications", "category": "environment", "owner": "[parameters('owner')]"}, "properties": {"ipssladdresscount": 0, "internalloadbalancingmode": "[parameters('internalloadbalancingmode')]", "dnssuffix": "[parameters('dnssuffix')]", "virtualnetwork": {"id": "[extensionresourceid(format('/subscriptions/{0}/resourcegroups/{1}", subscription().subscriptionid, parameters('vnetresourcegroupname')), "microsoft.network/virtualnetworks/subnets", parameters('virtualnetworkname'), parameters('subnetname'))]"}}}{"type": "microsoft.web/serverfarms", "apiversion": "2020-12-01", "name": "[parameters('appserviceplanname')]", "location": "[parameters('location')]", "tags": {"displayname": "ase hosting plan", "usage": "hosting plan within ase", "category": "hosting", "owner": "[parameters('owner')]"}, "properties": {"hostingenvironmentprofile": {"id": "[resourceid('microsoft.web/hostingenvironments", parameters('asename'))]"}}, "sku": {"name": "[format('i{0}", parameters('workerpool'))]", "tier": "isolated", "size": "[format('i{0}", parameters('workerpool'))]", "family": "i", "capacity": "[parameters('numberofworkers')]"}, "dependson": ["[resourceid('microsoft.web/hostingenvironments", parameters('asename'))]"]}{"type": "microsoft.web/sites", "apiversion": "2020-12-01", "name": "[parameters('sitename')]", "location": "[parameters('location')]", "tags": {"displayname": "ase web app", "usage": "web app hosted within ase", "category": "web app", "owner": "[parameters('owner')]"}, "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('appserviceplanname'))]", "hostingenvironmentprofile": {"id": "[resourceid('microsoft.web/hostingenvironments", parameters('asename'))]"}}, "dependson": ["[resourceid('microsoft.web/hostingenvironments", parameters('asename'))]", "[resourceid('microsoft.web/serverfarms", parameters('appserviceplanname'))]"]}
Create an App Service Environment with an ILB Address
{"apiversion": "2020-12-01", "type": "microsoft.web/hostingenvironments", "name": "[parameters('asename')]", "location": "[parameters('location')]", "properties": {"name": "[parameters('asename')]", "location": "[parameters('location')]", "ipssladdresscount": "[parameters('ipssladdresscount')]", "internalloadbalancingmode": "[parameters('internalloadbalancingmode')]", "virtualnetwork": {"id": "[resourceid(parameters('existingvirtualnetworkresourcegroup'), "microsoft.network/virtualnetworks/subnets", parameters('existingvnetresourceid'), parameters('subnetname'))]"}, "multisize": "[parameters('frontendsize')]", "multirolecount": "[parameters('frontendcount')]", "workerpools": [{"workersizeid": 0, "workersize": "[parameters('workerpooloneinstancesize')]", "workercount": "[parameters('workerpooloneinstancecount')]"}, {"workersizeid": 1, "workersize": "[parameters('workerpooltwoinstancesize')]", "workercount": "[parameters('workerpooltwoinstancecount')]"}, {"workersizeid": 2, "workersize": "[parameters('workerpoolthreeinstancesize')]", "workercount": "[parameters('workerpoolthreeinstancecount')]"}]}}
Create an App Service Environment v2 with an ILB Address
{"apiversion": "2020-06-01", "type": "microsoft.web/hostingenvironments", "name": "[parameters('asename')]", "kind": "asev2", "location": "[parameters('location')]", "properties": {"name": "[parameters('asename')]", "location": "[parameters('location')]", "ipssladdresscount": 0, "internalloadbalancingmode": "[parameters('internalloadbalancingmode')]", "virtualnetwork": {"id": "[resourceid(parameters('existingvirtualnetworkresourcegroup'), "microsoft.network/virtualnetworks/subnets", parameters('existingvirtualnetworkname'), parameters('subnetname'))]"}}}
Create a web app on Azure with Java 13 and Tomcat 9 enabled.
{"apiversion": "2020-06-01", "name": "[parameters('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skucapacity')]"}, "properties": {"name": "[parameters('hostingplanname')]"}}{"apiversion": "2020-06-01", "name": "[parameters('websitename')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "tags": {"[concat('hidden-related:", resourcegroup().id, "/providers/microsoft.web/serverfarms/", parameters('hostingplanname'))]": "resource", "displayname": "website"}, "dependson": ["[resourceid('microsoft.web/serverfarms/", parameters('hostingplanname'))]"], "properties": {"name": "[parameters('websitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanname'))]"}, "resources": [{"apiversion": "2020-06-01", "name": "web", "type": "config", "dependson": ["[resourceid('microsoft.web/sites/", parameters('websitename'))]"], "properties": {"javaversion": "1.8", "javacontainer": "tomcat", "javacontainerversion": "9.0"}}]}
This template provides a easy way to deploy Web App on Linux with Azure database for PostgreSQL(Preview).
{"type": "microsoft.web/sites", "name": "[parameters('sitename')]", "dependson": ["[variables('hostingplanname')]"], "properties": {"siteconfig": {"linuxfxversion": "node|6.10", "connectionstrings": [{"name": "defaultconnection", "connectionstring": "[concat('database=", variables('databasename'), ";server=", reference(resourceid('microsoft.dbforpostgresql/servers",variables('servername'))).fullyqualifieddomainname, ";user id=",parameters('administratorlogin'),"@",variables('servername') ,";password=",parameters('administratorloginpassword'))]", "type": "postgresql"}]}, "name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "apiversion": "2019-08-01", "location": "[parameters('location')]"}{"apiversion": "2019-08-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "properties": {"name": "[variables('hostingplanname')]", "workersizeid": "1", "reserved": true, "numberofworkers": "1"}, "sku": {"tier": "standard", "name": "s1"}, "kind": "linux"}
Create an AppServicePlan and App in an App Service Environment v2
{"apiversion": "2020-06-01", "name": "[parameters('appserviceplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "properties": {"name": "[parameters('appserviceplanname')]", "hostingenvironmentprofile": {"id": "[resourceid('microsoft.web/hostingenvironments", parameters('appserviceenvironmentname'))]"}}, "sku": {"name": "[concat('i",parameters('pricingtier'))]", "tier": "isolated", "size": "[concat('i",parameters('pricingtier'))]", "family": "i", "capacity": "[parameters('capacity')]"}}{"apiversion": "2020-06-01", "name": "[parameters('sitename')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "properties": {"name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('appserviceplanname'))]", "hostingenvironmentprofile": {"id": "[resourceid('microsoft.web/hostingenvironments", parameters('appserviceenvironmentname'))]"}}, "dependson": ["[resourceid('microsoft.web/serverfarms/", parameters('appserviceplanname'))]"]}
This template provides an easy way to deploy a web app with custom deployment slots on Azure Web Apps.
{"apiversion": "2020-06-01", "type": "microsoft.web/serverfarms", "kind": "app", "name": "[variables('appserviceplanname')]", "location": "[parameters('location')]", "comments": "this app service plan is used for the web app and slots.", "tags": {"displayname": "appserviceplan"}, "properties": {}, "sku": {"name": "[if(lessorequals(length(parameters('environments')), variables('standardplanmaxadditionalslots')), "s1", "p1')]"}}{"apiversion": "2020-06-01", "type": "microsoft.web/sites", "kind": "app", "name": "[variables('webappportalname')]", "location": "[parameters('location')]", "comments": "this is the web app, also the default "nameless" slot.", "tags": {"displayname": "webapp"}, "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "siteconfig": {"appsettings": [{"name": "[parameters('appsettingname')]", "value": "value"}, {"name": "[variables('stickyappsettingname')]", "value": "value"}]}}, "dependson": ["[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]"]}{"apiversion": "2020-06-01", "type": "microsoft.web/sites/slots", "name": "[concat(variables('webappportalname'), "/", parameters('environments')[copyindex()])]", "kind": "app", "location": "[parameters('location')]", "comments": "this specifies the web app slots.", "tags": {"displayname": "webappslots"}, "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]"}, "dependson": ["[resourceid('microsoft.web/sites", variables('webappportalname'))]"], "copy": {"name": "webportalslot", "count": "[length(parameters('environments'))]"}}{"apiversion": "2020-06-01", "name": "[concat(variables('webappportalname'), "/slotconfignames')]", "type": "microsoft.web/sites/config", "comments": "this specifies the sticky (slot setting) application settings.", "dependson": ["[resourceid('microsoft.web/sites", variables('webappportalname'))]"], "properties": {"appsettingnames": ["[variables('stickyappsettingname')]"]}}
Deploy a Web App certificate from Key Vault secret and use it for creating SSL binding
{"type": "microsoft.web/certificates", "name": "[parameters('certificatename')]", "apiversion": "2019-08-01", "location": "[parameters('location')]", "properties": {"keyvaultid": "[parameters('existingkeyvaultid')]", "keyvaultsecretname": "[parameters('existingkeyvaultsecretname')]", "serverfarmid": "[parameters('existingserverfarmid')]"}}{"type": "microsoft.web/sites", "name": "[parameters('existingwebappname')]", "apiversion": "2019-08-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/certificates", parameters('certificatename'))]"], "properties": {"name": "[parameters('existingwebappname')]", "hostnamesslstates": [{"name": "[parameters('hostname')]", "sslstate": "snienabled", "thumbprint": "[reference(resourceid('microsoft.web/certificates", parameters('certificatename'))).thumbprint]", "toupdate": true}]}}
This template provides a way to deploy Web Apps on Linux with Azure database for MySQL.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"tier": "standard", "name": "s1"}, "kind": "linux", "properties": {"reserved": true}}{"type": "microsoft.web/sites", "apiversion": "2021-02-01", "name": "[parameters('sitename')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "properties": {"siteconfig": {"linuxfxversion": "php|7.0", "ftpsstate": "ftpsonly", "mintlsversion": "1.2", "scmmintlsversion": "1.2", "connectionstrings": [{"name": "defaultconnection", "connectionstring": "[format('database={0};data source={1};user id={2}@{3};password={4}", variables('databasename'), reference(resourceid('microsoft.dbformysql/servers", variables('mysqlservername'))).fullyqualifieddomainname, parameters('administratorlogin'), variables('mysqlservername'), parameters('administratorloginpassword'))]", "type": "mysql"}]}, "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "httpsonly": true}, "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "[resourceid('microsoft.dbformysql/servers", variables('mysqlservername'))]"]}
This template creates an Azure Web App with Blob Storage connection string. Template originally authored by Jeff Bowles of Microsoft
{"name": "[parameters('webappsvcplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "apiversion": "2020-12-01", "tags": {"displayname": "appsvcplan"}, "sku": {"name": "[parameters('webappsvcplansku')]"}, "properties": {"name": "[parameters('webappsvcplanname')]", "workersize": "[parameters('webappsvcplanworkersize')]", "numberofworkers": 1}}{"name": "[parameters('webappname')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.web/serverfarms/", parameters('webappsvcplanname'))]"], "tags": {"[concat('hidden-related:", resourcegroup().id, "/providers/microsoft.web/serverfarms/", parameters('webappsvcplanname'))]": "resource", "displayname": "webapp"}, "properties": {"name": "[parameters('webappname')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms/", parameters('webappsvcplanname'))]"}, "resources": [{"apiversion": "2020-12-01", "name": "web", "type": "config", "dependson": ["[resourceid('microsoft.web/sites/", parameters('webappname'))]"], "tags": {"displayname": "webappconfig"}, "properties": {"phpversion": "5.6", "netframeworkversion": "v4.6", "use32bitworkerprocess": false, "websocketsenabled": true, "alwayson": false, "remotedebuggingenabled": true, "remotedebuggingversion": "vs2017"}}, {"name": "msdeploy", "type": "extensions", "location": "[parameters('location')]", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.web/sites/", parameters('webappname'))]", "[resourceid('microsoft.web/sites/config",parameters('webappname'), "web')]"], "tags": {"displayname": "webappmsdeploy"}, "properties": {"packageuri": "[variables('packageuri')]"}}, {"name": "connectionstrings", "type": "config", "apiversion": "2020-12-01", "dependson": ["[resourceid('microsoft.web/sites/", parameters('webappname'))]", "[resourceid('microsoft.web/sites/extensions", parameters('webappname'), "msdeploy')]"], "tags": {"displayname": "webappconnectionstrings"}, "properties": {"blobconnection": {"value": "[concat('defaultendpointsprotocol=https;accountname=",parameters('storageaccountname'),";accountkey=",concat(listkeys(variables('storageaccountid'),"2015-05-01-preview').key1))]", "type": "custom"}}}]}
Create a Web App plus Redis Cache using a template
{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skucapacity')]"}, "properties": {"name": "[variables('hostingplanname')]"}}{"apiversion": "2015-08-01", "name": "[variables('websitename')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]", "[resourceid('microsoft.cache/redis/", variables('cachename'))]"], "tags": {"[concat('hidden-related:", resourcegroup().id, "/providers/microsoft.web/serverfarms/", variables('hostingplanname'))]": "empty", "displayname": "website"}, "properties": {"name": "[variables('websitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "resources": [{"apiversion": "2015-08-01", "type": "config", "name": "appsettings", "dependson": ["[resourceid('microsoft.web/sites/", variables('websitename'))]", "[resourceid('microsoft.cache/redis/", variables('cachename'))]"], "properties": {"cacheconnection": "[concat(variables('cachename'),".redis.cache.windows.net,abortconnect=false,ssl=true,password=", listkeys(resourceid('microsoft.cache/redis", variables('cachename')), "2020-12-01').primarykey)]"}}]}
This template allows you to deploy an App Service Plan and a basic Linux web app
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('appserviceplanportalname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}, "kind": "linux", "properties": {"reserved": true}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('webappname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('appserviceplanportalname'))]"], "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanportalname'))]", "siteconfig": {"linuxfxversion": "[parameters('linuxfxversion')]"}, "resources": [{"condition": "[contains(parameters('repourl'),"http')]", "type": "sourcecontrols", "apiversion": "2020-06-01", "name": "web", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('webappname'))]"], "properties": {"repourl": "[parameters('repourl')]", "branch": "master", "ismanualintegration": true}}]}}
Create an AppServicePlan and App in an ASE
{"apiversion": "2020-12-01", "name": "[parameters('appserviceplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('existingaselocation')]", "properties": {"name": "[parameters('appserviceplanname')]", "hostingenvironmentprofile": {"id": "[resourceid('microsoft.web/hostingenvironments",parameters('appserviceenvironmentname'))]"}}, "sku": {"name": "[concat('p",parameters('workerpool'))]", "tier": "premium", "size": "[concat('p",parameters('workerpool'))]", "family": "p", "capacity": "[parameters('numberofworkersfromworkerpool')]"}}{"apiversion": "2020-12-01", "name": "[parameters('sitename')]", "type": "microsoft.web/sites", "location": "[parameters('existingaselocation')]", "properties": {"name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms",parameters('appserviceplanname'))]", "hostingenvironmentprofile": {"id": "[resourceid('microsoft.web/hostingenvironments", parameters('appserviceenvironmentname'))]"}}, "dependson": ["[resourceid('microsoft.web/serverfarms/",parameters('appserviceplanname'))]"]}
Azure Function app and an HTTP-triggered function
{"type": "microsoft.web/serverfarms", "apiversion": "2020-12-01", "name": "[variables('appserviceplanname')]", "location": "[parameters('location')]", "kind": "functionapp", "sku": {"name": "y1"}, "properties": {}}{"type": "microsoft.web/sites", "apiversion": "2020-12-01", "name": "[variables('functionappname')]", "location": "[parameters('location')]", "kind": "functionapp", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "siteconfig": {"appsettings": [{"name": "azurewebjobsstorage", "value": "[format('defaultendpointsprotocol=https;accountname={0};endpointsuffix={1};accountkey={2}", variables('storageaccountname'), environment().suffixes.storage, listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-04-01').keys[0].value)]"}, {"name": "website_contentazurefileconnectionstring", "value": "[format('defaultendpointsprotocol=https;accountname={0};endpointsuffix={1};accountkey={2}", variables('storageaccountname'), environment().suffixes.storage, listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2021-04-01').keys[0].value)]"}, {"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components", variables('appinsightsname'))).instrumentationkey]"}, {"name": "applicationinsights_connection_string", "value": "[format('instrumentationkey={0}", reference(resourceid('microsoft.insights/components", variables('appinsightsname'))).instrumentationkey)]"}, {"name": "functions_worker_runtime", "value": "[variables('functionruntime')]"}, {"name": "functions_extension_version", "value": "~3"}]}, "httpsonly": true}, "dependson": ["[resourceid('microsoft.insights/components", variables('appinsightsname'))]", "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"]}{"type": "microsoft.web/sites/functions", "apiversion": "2020-12-01", "name": "[format('{0}/{1}", variables('functionappname'), variables('functionnamecomputed'))]", "properties": {"config": {"disabled": false, "bindings": [{"name": "req", "type": "httptrigger", "direction": "in", "authlevel": "function", "methods": ["get"]}, {"name": "$return", "type": "http", "direction": "out"}]}, "files": {"run.csx": "#r "newtonsoft.json"\r\n\r\nusing system.net;\r\nusing microsoft.aspnetcore.mvc;\r\nusing microsoft.extensions.primitives;\r\nusing newtonsoft.json;\r\n\r\npublic static async task<iactionresult> run(httprequest req, ilogger log)\r\n{\r\n log.loginformation("c# http trigger function processed a request.");\r\n\r\n string name = req.query["name"];\r\n\r\n string requestbody = await new streamreader(req.body).readtoendasync();\r\n dynamic data = jsonconvert.deserializeobject(requestbody);\r\n name = name ?? data?.name;\r\n\r\n string responsemessage = string.isnullorempty(name)\r\n ? "this http triggered function executed successfully. pass a name in the query string or in the request body for a personalized response."\r\n : $"hello, {name}. this http triggered function executed successfully.";\r\n\r\n return new okobjectresult(responsemessage);\r\n}"}}, "dependson": ["[resourceid('microsoft.web/sites", variables('functionappname'))]"]}
Create a Web App plus Redis Cache plus SQL Database using a template
{"apiversion": "2015-08-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skucapacity')]"}, "properties": {"name": "[variables('hostingplanname')]"}}{"apiversion": "2015-08-01", "name": "[variables('websitename')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]", "[resourceid('microsoft.cache/redis/", variables('cachename'))]"], "tags": {"[concat('hidden-related:", resourcegroup().id, "/providers/microsoft.web/serverfarms/", variables('hostingplanname'))]": "empty", "displayname": "website"}, "properties": {"name": "[variables('websitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "resources": [{"apiversion": "2015-08-01", "type": "config", "name": "connectionstrings", "dependson": ["[resourceid('microsoft.web/sites/", variables('websitename'))]", "[resourceid('microsoft.sql/servers/", variables('sqlservername'))]"], "properties": {"teamcontext": {"value": "[concat('data source=tcp:", reference(resourceid('microsoft.sql/servers/", variables('sqlservername'))).fullyqualifieddomainname, ",1433;initial catalog=", parameters('databasename'), ";user id=", parameters('administratorlogin'), "@", variables('sqlservername'), ";password=", parameters('administratorloginpassword'), ";')]", "type": "sqlserver"}}}, {"apiversion": "2015-08-01", "type": "config", "name": "appsettings", "dependson": ["[resourceid('microsoft.web/sites/", variables('websitename'))]", "[resourceid('microsoft.cache/redis/", variables('cachename'))]"], "properties": {"cacheconnection": "[concat(variables('cachename'),".redis.cache.windows.net,abortconnect=false,ssl=true,password=", listkeys(resourceid('microsoft.cache/redis", variables('cachename')), "2020-12-01').primarykey)]"}}]}
Deploy an App Service with a Private Endpoint
{"type": "microsoft.web/serverfarms", "apiversion": "2019-08-01", "name": "[parameters('serverfarm_name')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku_name')]", "tier": "[parameters('sku_tier')]", "size": "[parameters('sku_size')]", "family": "[parameters('sku_family')]", "capacity": 1}, "kind": "app"}{"type": "microsoft.web/sites", "apiversion": "2019-08-01", "name": "[parameters('site_name')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('serverfarm_name'))]"], "kind": "app", "properties": {"enabled": true, "hostnamesslstates": [{"name": "[concat(parameters('site_name'), parameters('webapp_dns_name'))]", "sslstate": "disabled", "hosttype": "standard"}, {"name": "[concat(parameters('site_name'), ".scm", parameters('webapp_dns_name'))]", "sslstate": "disabled", "hosttype": "repository"}], "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('serverfarm_name'))]"}}{"type": "microsoft.web/sites/config", "apiversion": "2019-08-01", "name": "[concat(parameters('site_name'), "/web')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('site_name'))]"], "properties": {"ftpsstate": "allallowed"}}{"type": "microsoft.web/sites/hostnamebindings", "apiversion": "2019-08-01", "name": "[concat(parameters('site_name'), "/", parameters('site_name'), parameters('webapp_dns_name'))]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('site_name'))]"], "properties": {"sitename": "[parameters('site_name')]", "hostnametype": "verified"}}
Provision a function app on a dedicated hosting plan with source code deployed from GitHub
{"type": "microsoft.web/serverfarms", "apiversion": "2020-12-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}, "properties": {"workersize": "[parameters('workersize')]", "numberofworkers": 1}}{"apiversion": "2020-12-01", "type": "microsoft.web/sites", "name": "[variables('functionappname')]", "location": "[parameters('location')]", "kind": "functionapp", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"], "properties": {"name": "[variables('functionappname')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "clientaffinityenabled": false, "siteconfig": {"alwayson": true, "cors": {"allowedorigins": ["*"]}, "appsettings": [{"name": "functions_extension_version", "value": "~1"}, {"name": "azurewebjobsstorage", "value": "[concat('defaultendpointsprotocol=https;accountname=",variables('storageaccountname'),";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value,";')]"}, {"name": "azurewebjobsdashboard", "value": "[concat('defaultendpointsprotocol=https;accountname=",variables('storageaccountname'),";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value,";')]"}]}}, "resources": [{"apiversion": "2018-11-01", "name": "web", "type": "sourcecontrols", "dependson": ["[resourceid('microsoft.web/sites", variables('functionappname'))]"], "properties": {"repourl": "[parameters('repourl')]", "branch": "[parameters('branch')]", "ismanualintegration": true}}]}
Provision a function app that runs on a Consumption (dynamic hosting) plan
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"name": "y1", "tier": "dynamic"}, "properties": {"name": "[variables('hostingplanname')]", "computemode": "dynamic"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[variables('functionappname')]", "location": "[parameters('location')]", "kind": "functionapp", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]"], "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "siteconfig": {"appsettings": [{"name": "azurewebjobsstorage", "value": "[concat('defaultendpointsprotocol=https;accountname=", variables('storageaccountname'), ";endpointsuffix=", environment().suffixes.storage, ";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "website_contentazurefileconnectionstring", "value": "[concat('defaultendpointsprotocol=https;accountname=", variables('storageaccountname'), ";endpointsuffix=", environment().suffixes.storage, ";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "website_contentshare", "value": "[tolower(variables('functionappname'))]"}, {"name": "functions_extension_version", "value": "~2"}, {"name": "website_node_default_version", "value": "~10"}, {"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components", variables('applicationinsightsname')), "2020-02-02-preview').instrumentationkey]"}, {"name": "functions_worker_runtime", "value": "[variables('functionworkerruntime')]"}]}}}{"type": "microsoft.web/sites/slots", "apiversion": "2020-06-01", "name": "[concat(variables('functionappname'), "/deployment')]", "kind": "functionapp", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", variables('functionappname'))]"], "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "siteconfig": {"appsettings": [{"name": "azurewebjobsstorage", "value": "[concat('defaultendpointsprotocol=https;accountname=", variables('storageaccountname'), ";endpointsuffix=", environment().suffixes.storage, ";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "website_contentazurefileconnectionstring", "value": "[concat('defaultendpointsprotocol=https;accountname=", variables('storageaccountname'), ";endpointsuffix=", environment().suffixes.storage, ";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "functions_extension_version", "value": "~3"}, {"name": "website_node_default_version", "value": "~10"}, {"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components", variables('applicationinsightsname')), "2020-02-02-preview').instrumentationkey]"}, {"name": "functions_worker_runtime", "value": "[variables('functionworkerruntime')]"}]}}}
Create and assign a wildcard App Service Certificate
{"type": "microsoft.web/certificates", "name": "[parameters('certificateordername')]", "apiversion": "2015-08-01", "location": "[parameters('existingapplocation')]", "dependson": ["[resourceid('microsoft.certificateregistration/certificateorders/certificates", parameters('certificateordername'), parameters('certificateordername'))]"], "properties": {"keyvaultid": "[parameters('existingkeyvaultid')]", "keyvaultsecretname": "[parameters('certificateordername')]"}}{"type": "microsoft.web/sites", "name": "[parameters('existingappname')]", "apiversion": "2015-08-01", "location": "[parameters('existingapplocation')]", "dependson": ["[resourceid('microsoft.web/certificates", parameters('certificateordername'))]"], "properties": {"name": "[parameters('existingappname')]", "hostnamesslstates": [{"name": "[parameters('roothostname')]", "sslstate": 1, "thumbprint": "[reference(resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))).signedcertificate.thumbprint]", "toupdate": true}, {"name": "[variables('wwwhostname')]", "sslstate": 1, "thumbprint": "[reference(resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))).signedcertificate.thumbprint]", "toupdate": true}]}}
Create an App Service Environment v2
{"type": "microsoft.web/hostingenvironments", "apiversion": "2020-06-01", "name": "[parameters('asename')]", "kind": "asev2", "location": "[parameters('location')]", "properties": {"location": "[parameters('location')]", "name": "[parameters('asename')]", "workerpools": [], "virtualnetwork": {"id": "[extensionresourceid(format('/subscriptions/{0}/resourcegroups/{1}", subscription().subscriptionid, parameters('existingvirtualnetworkresourcegroup')), "microsoft.network/virtualnetworks/subnets", parameters('existingvirtualnetworkname'), parameters('existingsubnetname'))]"}}}
Deploy a WebApp Service liked with a GitHub Repository.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-12-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]", "capacity": "[parameters('workersize')]"}, "properties": {"name": "[variables('hostingplanname')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-12-01", "name": "[parameters('sitename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"], "properties": {"id": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "resources": [{"type": "sourcecontrols", "apiversion": "2020-12-01", "name": "web", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('sitename'))]"], "properties": {"repourl": "[parameters('repourl')]", "branch": "[parameters('branch')]", "ismanualintegration": true}}]}
This template allows you to deploy an app service plan and a basic Windows web app, with regional VNet integration enabled to a newly created virtual network
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('appserviceplanname')]", "location": "[parameters('location')]", "sku": {"name": "[variables('appserviceplansku')]"}, "kind": "app"}{"type": "microsoft.web/sites", "apiversion": "2021-01-01", "name": "[parameters('appname')]", "location": "[parameters('location')]", "kind": "app", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "virtualnetworksubnetid": "[reference(resourceid('microsoft.network/virtualnetworks", variables('vnetname'))).subnets[0].id]", "httpsonly": true, "siteconfig": {"vnetrouteallenabled": true, "http20enabled": true}}, "dependson": ["[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]", "[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]"]}
Simple example to deploy Azure infrastructure for app + data + managed identity + monitoring
{"type": "microsoft.web/sites/config", "apiversion": "2020-12-01", "name": "[format('{0}/{1}", format('website{0}", uniquestring(resourcegroup().id)), "connectionstrings')]", "properties": {"defaultconnection": {"value": "[format('data source=tcp:{0},1433;initial catalog={1};user id={2}@{3};password={4};", reference(resourceid('microsoft.sql/servers", format('sqlserver{0}", uniquestring(resourcegroup().id)))).fullyqualifieddomainname, variables('databasename'), reference(resourceid('microsoft.sql/servers", format('sqlserver{0}", uniquestring(resourcegroup().id)))).administratorlogin, reference(resourceid('microsoft.sql/servers", format('sqlserver{0}", uniquestring(resourcegroup().id)))).fullyqualifieddomainname, parameters('sqladministratorpassword'))]", "type": "sqlazure"}}, "dependson": ["[resourceid('microsoft.sql/servers/databases", format('sqlserver{0}", uniquestring(resourcegroup().id)), variables('databasename'))]", "[resourceid('microsoft.sql/servers", format('sqlserver{0}", uniquestring(resourcegroup().id)))]", "[resourceid('microsoft.web/sites", format('website{0}", uniquestring(resourcegroup().id)))]"]}{"type": "microsoft.web/serverfarms", "apiversion": "2020-12-01", "name": "[format('hostingplan{0}", uniquestring(resourcegroup().id))]", "location": "[parameters('location')]", "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skucapacity')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-12-01", "name": "[format('website{0}", uniquestring(resourcegroup().id))]", "location": "[parameters('location')]", "tags": {"[format('hidden-related:{0}", resourceid('microsoft.web/serverfarms", format('hostingplan{0}", uniquestring(resourcegroup().id))))]": "empty", "displayname": "website"}, "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", format('hostingplan{0}", uniquestring(resourcegroup().id)))]"}, "identity": {"type": "userassigned", "userassignedidentities": {"[resourceid('microsoft.managedidentity/userassignedidentities", parameters('managedidentityname'))]": {}}}, "dependson": ["[resourceid('microsoft.web/serverfarms", format('hostingplan{0}", uniquestring(resourcegroup().id)))]", "[resourceid('microsoft.managedidentity/userassignedidentities", parameters('managedidentityname'))]"]}
Create Managed Certificate (Free) APEX (root domain) for WebApp
{"apiversion": "2020-12-01", "location": "[parameters('location')]", "name": "[concat(parameters('subjectname'), "-", parameters('appserviceplanname'))]", "type": "microsoft.web/certificates", "properties": {"serverfarmid": "[resourceid(parameters('resourcegroupname'),"microsoft.web/serverfarms/", parameters('appserviceplanname'))]", "canonicalname": "[parameters('subjectname')]", "domainvalidationmethod": "http-token"}}
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.
{"apiversion": "2020-06-01", "type": "microsoft.web/hostingenvironments", "name": "[parameters('stackname')]", "kind": "asev2", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]", "[resourceid('microsoft.network/virtualnetworks/subnets",variables('vnetname'), parameters('frontendsubnet'))]"], "properties": {"internalloadbalancingmode": 3, "virtualnetwork": {"id": "[resourceid('microsoft.network/virtualnetworks/subnets", variables('vnetname'), parameters('frontendsubnet'))]"}}}{"apiversion": "2020-06-01", "name": "[parameters('stackname')]", "type": "microsoft.web/serverfarms", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.web/hostingenvironments",parameters('stackname'))]"], "properties": {"name": "[parameters('stackname')]", "hostingenvironmentprofile": {"id": "[resourceid('microsoft.web/hostingenvironments",parameters('stackname'))]"}}, "sku": {"name": "[concat('i",variables('workerpool'))]", "tier": "isolated", "size": "[concat('i",variables('workerpool'))]", "family": "i", "capacity": "[variables('numberofworkersfromworkerpool')]"}}{"apiversion": "2020-06-01", "name": "[parameters('stackname')]", "type": "microsoft.web/sites", "location": "[variables('location')]", "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.web/serverfarms/",parameters('stackname'))]", "[resourceid('microsoft.insights/components/", parameters('stackname'))]"], "properties": {"name": "[parameters('stackname')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms",parameters('stackname'))]", "hostingenvironmentprofile": {"id": "[resourceid('microsoft.web/hostingenvironments", parameters('stackname'))]"}, "siteconfig": {"appsettings": [{"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components/", parameters('stackname')), "2018-05-01-preview').instrumentationkey]"}, {"name": "applicationinsightsagent_extension_version", "value": "~2"}, {"name": "xdt_microsoftapplicationinsights_mode", "value": "default"}, {"name": "diagnosticservices_extension_version", "value": "disabled"}, {"name": "appinsights_profilerfeature_version", "value": "disabled"}, {"name": "appinsights_snapshotfeature_version", "value": "disabled"}, {"name": "instrumentationengine_extension_version", "value": "disabled"}, {"name": "snapshotdebugger_extension_version", "value": "disabled"}, {"name": "xdt_microsoftapplicationinsights_baseextensions", "value": "disabled"}]}}}{"type": "microsoft.web/sites/config", "apiversion": "2020-06-01", "name": "[concat(parameters('stackname'), "/web')]", "location": "[variables('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('stackname'))]"], "properties": {"netframeworkversion": "v5.0"}}
Deploy a Web App with diagnostics logging to Storage Account Blob Container enabled.
{"apiversion": "2020-12-01", "type": "microsoft.web/serverfarms", "name": "[parameters('appserviceplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('appserviceplanskuname')]"}}{"apiversion": "2020-12-01", "type": "microsoft.web/sites", "name": "[parameters('webappname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('appserviceplanname'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"], "properties": {"name": "[parameters('webappname')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms/", parameters('appserviceplanname'))]"}, "resources": [{"apiversion": "2020-12-01", "type": "config", "name": "logs", "dependson": ["[resourceid('microsoft.web/sites", parameters('webappname'))]"], "properties": {"applicationlogs": {"azureblobstorage": {"level": "[parameters('diagnosticslogslevel')]", "sasurl": "[concat(reference(resourceid('microsoft.storage/storageaccounts/", parameters('storageaccountname'))).primaryendpoints.blob, variables('blobcontainername'), "?", listaccountsas(parameters('storageaccountname'), "2018-02-01", variables('listaccountsasrequestcontent')).accountsastoken)]", "retentionindays": "[parameters('diagnosticslogsretentionindays')]"}}}}]}
Deploy an App Service that supports ASP.NET v4.0. It gives you the support to deploy your own ASP.NET app.
{"apiversion": "2020-06-01", "name": "[parameters('webappname')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.insights/components/", variables('appinsight'))]", "[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]"], "properties": {"name": "[parameters('webappname')]", "siteconfig": {"appsettings": [{"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components/", variables('appinsight')), "2020-02-02').instrumentationkey]"}, {"name": "applicationinsightsagent_extension_version", "value": "~2"}, {"name": "xdt_microsoftapplicationinsights_mode", "value": "default"}, {"name": "diagnosticservices_extension_version", "value": "disabled"}, {"name": "appinsights_profilerfeature_version", "value": "disabled"}, {"name": "appinsights_snapshotfeature_version", "value": "disabled"}, {"name": "instrumentationengine_extension_version", "value": "disabled"}, {"name": "snapshotdebugger_extension_version", "value": "disabled"}, {"name": "xdt_microsoftapplicationinsights_baseextensions", "value": "disabled"}], "metadata": [{"name": "current_stack", "value": "[variables('currentstack')]"}], "netframeworkversion": "[variables('netframeworkversion')]", "alwayson": "[variables('alwayson')]"}, "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "clientaffinityenabled": true}}{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "properties": {"name": "[variables('hostingplanname')]", "workersize": "[variables('workersize')]", "workersizeid": "[variables('workersizeid')]", "numberofworkers": "[variables('numberofworkers')]"}, "sku": {"tier": "[variables('sku')]", "name": "[variables('skucode')]"}}
Configures the default SSL certificate for an ILB ASE or an ILB ASE v2
{"apiversion": "2015-08-01", "type": "microsoft.web/certificates", "name": "[parameters('certificatename')]", "location": "[parameters('existingaselocation')]", "properties": {"pfxblob": "[parameters('pfxblobstring')]", "password": "[parameters('password')]", "hostingenvironmentprofile": {"id": "[resourceid('microsoft.web/hostingenvironments",parameters('appserviceenvironmentname'))]"}}}{"apiversion": "2015-08-01", "type": "microsoft.web/hostingenvironments", "name": "[parameters('appserviceenvironmentname')]", "location": "[parameters('existingaselocation')]", "properties": {"clustersettings": [{"name": "defaultsslcertificatethumbprint", "value": "[parameters('certificatethumbprint')]"}]}, "dependson": ["[concat('microsoft.web/certificates/",parameters('certificatename'))]"]}
Deploy an App Service that supports Node. It gives you the support to deploy your own Node app.
{"apiversion": "2020-06-01", "name": "[parameters('webappname')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]"], "properties": {"name": "[parameters('webappname')]", "siteconfig": {"linuxfxversion": "[variables('linuxfxversion')]", "alwayson": "[variables('alwayson')]"}, "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "clientaffinityenabled": false}}{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "kind": "linux", "sku": {"tier": "[variables('sku')]", "name": "[variables('skucode')]"}, "properties": {"name": "[variables('hostingplanname')]", "workersize": "[variables('workersize')]", "workersizeid": "[variables('workersizeid')]", "numberofworkers": "[variables('numberofworkers')]", "reserved": true}}
Create a web app with aa custom domain and optional SSL binding
{"type": "microsoft.web/serverfarms", "apiversion": "2019-08-01", "name": "[variables('appserviceplanname')]", "location": "[parameters('location')]", "properties": {"name": "[variables('appserviceplanname')]"}, "sku": {"name": "p1", "tier": "premium", "size": "1", "family": "p", "capacity": "1"}}{"type": "microsoft.web/sites", "apiversion": "2019-08-01", "name": "[parameters('webappname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]"], "properties": {"name": "[parameters('webappname')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]"}}{"condition": "[variables('enablessl')]", "type": "microsoft.web/certificates", "apiversion": "2019-08-01", "name": "[variables('certificatename')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('webappname'))]"], "properties": {"keyvaultid": "[parameters('existingkeyvaultid')]", "keyvaultsecretname": "[parameters('existingkeyvaultsecretname')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanname'))]"}}{"type": "microsoft.web/sites/hostnamebindings", "name": "[concat(parameters('webappname'), "/", parameters('customhostname'))]", "apiversion": "2019-08-01", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/certificates", variables('certificatename'))]"], "properties": {"sslstate": "[if(variables('enablessl'), "snienabled", json('null'))]", "thumbprint": "[if(variables('enablessl'), reference(resourceid('microsoft.web/certificates", variables('certificatename'))).thumbprint, json('null'))]"}}
This template creates an Azure Cosmos DB account, an App Service Plan, and a Web App.
{"type": "microsoft.web/serverfarms", "apiversion": "2021-02-01", "name": "[parameters('appsvcplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('svcplansize')]", "tier": "[parameters('svcplansku')]", "capacity": 1}}{"type": "microsoft.web/sites", "apiversion": "2021-02-01", "name": "[parameters('webappname')]", "location": "[parameters('location')]", "identity": {"type": "systemassigned"}, "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('appsvcplanname'))]", "httpsonly": true, "siteconfig": {"ftpsstate": "ftpsonly", "phpversion": "off", "mintlsversion": "1.2", "appsettings": [{"name": "documentdb_endpoint", "value": "[reference(resourceid('microsoft.documentdb/databaseaccounts", parameters('databaseaccountname'))).documentendpoint]"}, {"name": "documentdb_primary_key", "value": "[listkeys(resourceid('microsoft.documentdb/databaseaccounts", parameters('databaseaccountname')), "2021-10-15').primarymasterkey]"}]}}, "dependson": ["[resourceid('microsoft.web/serverfarms", parameters('appsvcplanname'))]", "[resourceid('microsoft.documentdb/databaseaccounts", parameters('databaseaccountname'))]"]}
Provision a Web App with a SQL Database
{"type": "microsoft.web/serverfarms", "apiversion": "2020-12-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skucapacity')]"}}{"type": "microsoft.web/sites", "apiversion": "2020-12-01", "name": "[variables('websitename')]", "location": "[parameters('location')]", "tags": {"[format('hidden-related:{0}", resourceid('microsoft.web/serverfarms", variables('hostingplanname')))]": "empty", "displayname": "website"}, "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"]}{"type": "microsoft.web/sites/config", "apiversion": "2020-12-01", "name": "[format('{0}/{1}", variables('websitename'), "connectionstrings')]", "properties": {"defaultconnection": {"value": "[format('data source=tcp:{0},1433;initial catalog={1};user id={2}@{3};password={4};", reference(resourceid('microsoft.sql/servers", variables('sqlservername'))).fullyqualifieddomainname, variables('databasename'), parameters('sqladministratorlogin'), reference(resourceid('microsoft.sql/servers", variables('sqlservername'))).fullyqualifieddomainname, parameters('sqladministratorloginpassword'))]", "type": "sqlazure"}}, "dependson": ["[resourceid('microsoft.sql/servers", variables('sqlservername'))]", "[resourceid('microsoft.web/sites", variables('websitename'))]"]}
This template provides a easy way to deploy web app on Azure App Service Web Apps with Azure database for MySQL.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "properties": {"reserved": true}, "sku": {"tier": "standard", "name": "s1"}}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('sitename')]", "location": "[parameters('location')]", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"]}{"type": "microsoft.web/sites/config", "apiversion": "2020-06-01", "name": "[format('{0}/{1}", parameters('sitename'), "connectionstrings')]", "properties": {"defaultconnection": {"value": "[format('database={0};data source={1};user id={2}@{3};password={4}", variables('databasename'), reference(resourceid('microsoft.dbformysql/servers", variables('servername'))).fullyqualifieddomainname, parameters('administratorlogin'), variables('servername'), parameters('administratorloginpassword'))]", "type": "mysql"}}, "dependson": ["[resourceid('microsoft.dbformysql/servers", variables('servername'))]", "[resourceid('microsoft.web/sites", parameters('sitename'))]"]}
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.
{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('serviceplanname')]", "location": "[parameters('location')]", "properties": {"name": "[variables('serviceplanname')]", "workersizeid": "1", "reserved": true, "numberofworkers": "1"}, "sku": {"name": "[parameters('serviceplanpricingtier')]", "tier": "[variables('serviceplanpricingtiers')[parameters('serviceplanpricingtier')].tier]", "capacity": "[parameters('serviceplancapacity')]"}, "kind": "linux"}{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('sitename')]", "location": "[parameters('location')]", "dependson": ["[variables('serviceplanname')]", "[variables('sqlservername')]"], "properties": {"siteconfig": {"linuxfxversion": "[concat('docker|sonarqube",":",parameters('sonarqubeimageversion'))]"}, "name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('serviceplanname'))]"}, "resources": [{"type": "config", "apiversion": "2020-06-01", "name": "appsettings", "dependson": ["[resourceid('microsoft.web/sites", parameters('sitename'))]"], "tags": {"displayname": "sonarappsettings"}, "properties": {"sonarqube_jdbc_url": "[concat('jdbc:sqlserver://", reference(resourceid('microsoft.sql/servers",variables('sqlservername'))).fullyqualifieddomainname, ";databasename=", variables('databasename'), ";encrypt=true;trustservercertificate=false;hostnameincertificate=", replace(reference(resourceid('microsoft.sql/servers", variables('sqlservername'))).fullyqualifieddomainname, concat(variables('sqlservername'), ".'), "*.'), ";logintimeout=30;')]", "sonarqube_jdbc_username": "[parameters('sqlserveradministratorusername')]", "sonarqube_jdbc_password": "[parameters('sqlserveradministratorpassword')]", "sonar.path.data": "/home/sonarqube/data"}}]}
This template allows you to deploy an Azure Function App that communicates with Azure Storage over private endpoints.
{"type": "microsoft.web/serverfarms", "apiversion": "2021-01-01", "name": "[parameters('functionappplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('functionappplansku')]", "tier": "elasticpremium", "size": "[parameters('functionappplansku')]", "family": "ep"}, "kind": "elastic", "properties": {"maximumelasticworkercount": 20, "reserved": "[variables('isreserved')]"}}{"type": "microsoft.web/sites", "apiversion": "2021-01-01", "name": "[parameters('functionappname')]", "location": "[parameters('location')]", "kind": "[if(variables('isreserved'), "functionapp,linux", "functionapp')]", "properties": {"serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('functionappplanname'))]", "reserved": "[variables('isreserved')]", "siteconfig": {"functionsruntimescalemonitoringenabled": true, "linuxfxversion": "[if(variables('isreserved'), "dotnet|3.1", json('null'))]", "appsettings": [{"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components", variables('applicationinsightsname'))).instrumentationkey]"}, {"name": "azurewebjobsstorage", "value": "[format('defaultendpointsprotocol=https;accountname={0};accountkey={1}", parameters('functionstorageaccountname'), listkeys(resourceid('microsoft.storage/storageaccounts", parameters('functionstorageaccountname')), "2021-02-01').keys[0].value)]"}, {"name": "website_contentazurefileconnectionstring", "value": "[format('defaultendpointsprotocol=https;accountname={0};accountkey={1}", parameters('functionstorageaccountname'), listkeys(resourceid('microsoft.storage/storageaccounts", parameters('functionstorageaccountname')), "2021-02-01').keys[0].value)]"}, {"name": "functions_extension_version", "value": "~3"}, {"name": "functions_worker_runtime", "value": "dotnet"}, {"name": "website_vnet_route_all", "value": "1"}, {"name": "website_contentovervnet", "value": "1"}, {"name": "website_contentshare", "value": "[variables('functioncontentsharename')]"}]}}, "dependson": ["[resourceid('microsoft.insights/components", variables('applicationinsightsname'))]", "[resourceid('microsoft.storage/storageaccounts/fileservices/shares", split(format('{0}/default/{1}", parameters('functionstorageaccountname'), variables('functioncontentsharename')), "/')[0], split(format('{0}/default/{1}", parameters('functionstorageaccountname'), variables('functioncontentsharename')), "/')[1], split(format('{0}/default/{1}", parameters('functionstorageaccountname'), variables('functioncontentsharename')), "/')[2])]", "[resourceid('microsoft.web/serverfarms", parameters('functionappplanname'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('functionstorageaccountname'))]", "[resourceid('microsoft.network/privatednszones/virtualnetworklinks", variables('privatestorageblobdnszonename'), format('{0}-link", variables('privatestorageblobdnszonename')))]", "[resourceid('microsoft.network/privateendpoints/privatednszonegroups", variables('privateendpointstorageblobname'), "blobprivatednszonegroup')]", "[resourceid('microsoft.network/privateendpoints/privatednszonegroups", variables('privateendpointstoragefilename'), "fileprivatednszonegroup')]", "[resourceid('microsoft.network/privatednszones/virtualnetworklinks", variables('privatestoragequeuednszonename'), format('{0}-link", variables('privatestoragequeuednszonename')))]", "[resourceid('microsoft.network/privateendpoints/privatednszonegroups", variables('privateendpointstoragequeuename'), "tableprivatednszonegroup')]", "[resourceid('microsoft.network/privatednszones/virtualnetworklinks", variables('privatestoragetablednszonename'), format('{0}-link", variables('privatestoragetablednszonename')))]", "[resourceid('microsoft.network/privateendpoints/privatednszonegroups", variables('privateendpointstoragetablename'), "tableprivatednszonegroup')]"]}{"type": "microsoft.web/sites/networkconfig", "apiversion": "2021-01-01", "name": "[format('{0}/{1}", parameters('functionappname'), "virtualnetwork')]", "properties": {"subnetresourceid": "[resourceid('microsoft.network/virtualnetworks/subnets", parameters('vnetname'), parameters('functionsubnetname'))]", "swiftsupported": true}, "dependson": ["[resourceid('microsoft.web/sites", parameters('functionappname'))]", "[resourceid('microsoft.network/virtualnetworks", parameters('vnetname'))]"]}
This template deploys an empty Function App and a hosting plan.
{"type": "microsoft.web/sites", "apiversion": "2019-08-01", "name": "[parameters('sitename')]", "kind": "functionapp,linux", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "[resourceid('microsoft.storage/storageaccounts", parameters('storageaccountname'))]"], "properties": {"name": "[parameters('sitename')]", "siteconfig": {"appsettings": [{"name": "functions_worker_runtime", "value": "python"}, {"name": "functions_extension_version", "value": "~2"}, {"name": "azurewebjobsstorage", "value": "[concat('defaultendpointsprotocol=https;accountname=", parameters('storageaccountname'), ";accountkey=", listkeys(variables('storageaccountid'),"2019-06-01').keys[0].value)]"}]}, "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "clientaffinityenabled": false}}{"type": "microsoft.web/serverfarms", "apiversion": "2019-08-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "kind": "linux", "properties": {"reserved": true}, "sku": {"tier": "standard", "name": "s1"}}
It allows you to deploy an App Service Plan and a Windows app
{"apiversion": "2020-06-01", "type": "microsoft.web/serverfarms", "name": "[variables('appserviceplanportalname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('sku')]"}}{"apiversion": "2020-06-01", "type": "microsoft.web/sites", "name": "[parameters('webappname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('appserviceplanportalname'))]"], "properties": {"siteconfig": "[variables('configreference')[parameters('language')]]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('appserviceplanportalname'))]"}, "resources": [{"type": "sourcecontrols", "apiversion": "2020-06-01", "name": "web", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/sites", parameters('webappname'))]"], "properties": {"repourl": "[variables('gitrepourl')]", "branch": "master", "ismanualintegration": true}}]}
Creates a function app with managed service identity.
{"name": "[parameters('functionappname')]", "type": "microsoft.web/sites", "apiversion": "2019-08-01", "location": "[parameters('location')]", "kind": "functionapp", "dependson": ["[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]", "[resourceid('microsoft.storage/storageaccounts", variables('storageaccountname'))]", "[resourceid('microsoft.insights/components", parameters('functionappname'))]"], "identity": {"type": "systemassigned"}, "properties": {"siteconfig": {"appsettings": [{"name": "functions_worker_runtime", "value": "[parameters('runtimestack')]"}, {"name": "azurewebjobsstorage", "value": "[concat('defaultendpointsprotocol=https;accountname=",variables('storageaccountname'), ";endpointsuffix=", environment().suffixes.storage, ";accountkey=",listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')), "2019-06-01').keys[0].value)]"}, {"name": "functions_extension_version", "value": "~2"}, {"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components", parameters('functionappname')), "2018-05-01-preview').instrumentationkey]"}, {"name": "website_contentazurefileconnectionstring", "value": "[concat('defaultendpointsprotocol=https;accountname=", variables('storageaccountname'), ";endpointsuffix=", environment().suffixes.storage, ";accountkey=", listkeys(resourceid('microsoft.storage/storageaccounts", variables('storageaccountname')),"2019-06-01').keys[0].value)]"}, {"name": "website_contentshare", "value": "[tolower(parameters('functionappname'))]"}, {"name": "website_time_zone", "value": "[parameters('timezone')]"}]}, "name": "[parameters('functionappname')]", "clientaffinityenabled": false, "serverfarmid": "[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]"}}{"type": "microsoft.web/serverfarms", "apiversion": "2019-08-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "properties": {"name": "[variables('hostingplanname')]"}, "sku": {"name": "y1", "tier": "dynamic", "size": "y1", "family": "y", "capacity": 0}}
Create and assign a standard App Service Certificate
{"type": "microsoft.web/sites/domainownershipidentifiers", "name": "[concat(parameters('existingappname'), concat('/", parameters('certificateordername')))]", "apiversion": "2016-08-01", "location": "[parameters('existingapplocation')]", "dependson": ["[resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))]"], "properties": {"id": "[reference(resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))).domainverificationtoken]"}}{"type": "microsoft.web/certificates", "name": "[parameters('certificateordername')]", "apiversion": "2015-08-01", "location": "[parameters('existingapplocation')]", "dependson": ["[resourceid('microsoft.certificateregistration/certificateorders/certificates", parameters('certificateordername'), parameters('certificateordername'))]"], "properties": {"keyvaultid": "[parameters('existingkeyvaultid')]", "keyvaultsecretname": "[parameters('certificateordername')]"}}{"type": "microsoft.web/sites", "name": "[parameters('existingappname')]", "apiversion": "2015-08-01", "location": "[parameters('existingapplocation')]", "dependson": ["[resourceid('microsoft.web/certificates", parameters('certificateordername'))]"], "properties": {"name": "[parameters('existingappname')]", "hostnamesslstates": [{"name": "[parameters('roothostname')]", "sslstate": 1, "thumbprint": "[reference(resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))).signedcertificate.thumbprint]", "toupdate": true}, {"name": "[variables('wwwhostname')]", "sslstate": 1, "thumbprint": "[reference(resourceid('microsoft.certificateregistration/certificateorders", parameters('certificateordername'))).signedcertificate.thumbprint]", "toupdate": true}]}}
Create a web app on Azure with Python enabled.
{"apiversion": "2020-06-01", "name": "[parameters('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "tags": {"displayname": "hostingplan"}, "sku": {"name": "[parameters('skuname')]", "capacity": "[parameters('skucapacity')]"}, "properties": {"name": "[parameters('hostingplanname')]", "reserved": true}}{"apiversion": "2020-06-01", "name": "[parameters('websitename')]", "type": "microsoft.web/sites", "location": "[parameters('location')]", "tags": {"[concat('hidden-related:", resourcegroup().id, "/providers/microsoft.web/serverfarms/", parameters('hostingplanname'))]": "resource", "displayname": "website"}, "dependson": ["[resourceid('microsoft.web/serverfarms/", parameters('hostingplanname'))]"], "properties": {"name": "[parameters('websitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", parameters('hostingplanname'))]", "siteconfig": {"linuxfxversion": "python|3.7"}}}
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).
{"comments": "this is the linux web app with the sonarquebe docker image", "type": "microsoft.web/sites", "name": "[parameters('sitename')]", "apiversion": "2020-06-01", "location": "[parameters('location')]", "dependson": ["[variables('hostingplanname')]", "[variables('databasename')]"], "properties": {"siteconfig": {"linuxfxversion": "docker|sonarqube"}, "name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "resources": [{"name": "appsettings", "type": "config", "apiversion": "2020-06-01", "dependson": ["[resourceid('microsoft.web/sites", parameters('sitename'))]"], "tags": {"displayname": "sonarappsettings"}, "comments": "this are the generated settings for the sonar jdbc connectionstring", "properties": {"sonarqube_jdbc_url": "[concat('jdbc:postgresql://", reference(resourceid('microsoft.dbforpostgresql/servers",variables('servername'))).fullyqualifieddomainname ,":5432/",variables('databasename'),"?user=", variables('jdbcsonarusername'), "&password=",parameters('administratorloginpassword'), "&ssl=true')]", "sonarqube_jdbc_username": "[variables('jdbcsonarusername')]", "sonarqube_jdbc_password": "[parameters('administratorloginpassword')]"}}]}{"apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "properties": {"name": "[variables('hostingplanname')]", "workersizeid": "1", "reserved": true, "numberofworkers": "1"}, "sku": {"tier": "[parameters('serviceplantier')]", "name": "[parameters('serviceplansku')]"}, "kind": "linux"}
This template provides a easy way to deploy a Sonarqube docker image (alpine tag) on a Linux Web App with Azure database for MySQL.
{"comments": "this is the linux web app with the sonarquebe docker image and the db", "type": "microsoft.web/sites", "name": "[parameters('sitename')]", "apiversion": "2019-08-01", "location": "[parameters('location')]", "dependson": ["[variables('hostingplanname')]", "[variables('databasename')]"], "properties": {"siteconfig": {"linuxfxversion": "docker|sonarqube"}, "name": "[parameters('sitename')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "resources": [{"comments": "this are the generated settings for the sonar jdbc connectionstring", "name": "appsettings", "type": "config", "apiversion": "2019-08-01", "dependson": ["[resourceid('microsoft.web/sites", parameters('sitename'))]"], "tags": {"displayname": "sonarappsettings"}, "properties": {"sonarqube_jdbc_url": "[concat('jdbc:mysql://", reference(resourceid('microsoft.dbformysql/servers",variables('servername'))).fullyqualifieddomainname , ":3306/",variables('databasename'),"?verifyservercertificate=true&usessl=true&requiressl=false&useunicode=true&characterencoding=utf8')]", "sonarqube_jdbc_username": "[variables('jdbcsonarusername')]", "sonarqube_jdbc_password": "[parameters('administratorloginpassword')]"}}]}{"apiversion": "2019-08-01", "name": "[variables('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[parameters('location')]", "properties": {"name": "[variables('hostingplanname')]", "workersizeid": "1", "reserved": true, "numberofworkers": "1"}, "sku": {"tier": "[parameters('serviceplantier')]", "name": "[parameters('serviceplansku')]"}, "kind": "linux"}
Provision a Mobile App with a SQL Database
{"type": "microsoft.web/serverfarms", "apiversion": "2019-08-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"name": "[parameters('hostingplansettings').skuname]", "tier": "[parameters('hostingplansettings').tier]", "capacity": "[parameters('hostingplansettings').capacity]"}, "properties": {"numberofworkers": 1}}{"apiversion": "2019-08-01", "type": "microsoft.web/sites", "name": "[variables('uniqueappname')]", "location": "[parameters('location')]", "kind": "mobileapp", "properties": {"name": "[variables('uniqueappname')]", "serverfarmid": "[resourceid('microsoft.web/serverfarms", variables('hostingplanname'))]"}, "dependson": ["[variables('hostingplanname')]"], "resources": [{"apiversion": "2019-08-01", "name": "appsettings", "type": "config", "dependson": ["[variables('uniqueappname')]"], "properties": {"ms_mobileservicename": "[variables('uniqueappname')]", "ms_notificationhubname": "[variables('notificationhubname')]"}}, {"apiversion": "2019-08-01", "name": "connectionstrings", "type": "config", "dependson": ["[variables('uniqueappname')]", "[variables('notificationhubname')]", "[variables('databasename')]"], "properties": {"ms_tableconnectionstring": {"value": "[concat('data source=tcp:", reference(resourceid('microsoft.sql/servers", variables('databaseservername'))).fullyqualifieddomainname, ",1433;initial catalog=", variables('databasename'), ";user id=", parameters('sqlserveradminlogin'), "@", variables('databaseservername'), ";password=", parameters('sqlserveradminpassword'), ";')]", "type": "sqlserver"}, "ms_notificationhubconnectionstring": {"value": "[listkeys(resourceid('microsoft.notificationhubs/namespaces/notificationhubs/authorizationrules", variables('notificationhubnamespace'), variables('notificationhubname'), "defaultfullsharedaccesssignature'), "2017-04-01').primaryconnectionstring]", "type": "custom"}}}, {"apiversion": "2019-08-01", "type": "providers/links", "name": "microsoft.resources/sitetohub", "dependson": ["[variables('uniqueappname')]", "[variables('notificationhubname')]"], "properties": {"targetid": "[resourceid('microsoft.notificationhubs/namespaces/notificationhubs", variables('notificationhubnamespace'), variables('notificationhubname'))]"}}]}
Deploy an App Service that supports Python. It gives you the support to deploy your own Django app.
{"type": "microsoft.web/sites", "apiversion": "2020-06-01", "name": "[parameters('webappname')]", "location": "[parameters('location')]", "dependson": ["[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]", "[resourceid('microsoft.insights/components", variables('appinsights'))]"], "properties": {"siteconfig": {"appsettings": [{"name": "websites_enable_app_service_storage", "value": "false"}, {"name": "appinsights_instrumentationkey", "value": "[reference(resourceid('microsoft.insights/components/", variables('appinsights'))).instrumentationkey]"}, {"name": "xdt_microsoftapplicationinsights_mode", "value": "default"}, {"name": "applicationinsightsagent_extension_version", "value": "~2"}], "linuxfxversion": "docker|appsvcorg/django-python:0.1"}, "name": "[parameters('webappname')]", "clientaffinityenabled": false, "serverfarmid": "[resourceid('microsoft.web/serverfarms/", variables('hostingplanname'))]"}}{"type": "microsoft.web/serverfarms", "apiversion": "2020-06-01", "name": "[variables('hostingplanname')]", "location": "[parameters('location')]", "sku": {"tier": "[variables('sku')]", "name": "[variables('skucode')]"}, "kind": "linux", "properties": {"name": "[variables('hostingplanname')]", "workersizeid": "[variables('workersize')]", "reserved": true, "numberofworkers": "1"}}
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.
{"type": "microsoft.web/sites/config", "apiversion": "2020-12-01", "name": "[format('{0}/{1}", variables('webappname'), "web')]", "properties": {"ftpsstate": "disabled", "mintlsversion": "1.2", "detailederrorloggingenabled": true, "httploggingenabled": true, "requesttracingenabled": true, "remotedebuggingenabled": false}, "dependson": ["[resourceid('microsoft.web/sites", variables('webappname'))]"]}{"type": "microsoft.web/serverfarms", "apiversion": "2021-01-01", "name": "[format('plan-{0}", variables('basename'))]", "location": "[parameters('location')]", "kind": "app", "sku": {"name": "[parameters('webappskuname')]", "capacity": 1}, "properties": {}}{"type": "microsoft.web/sites", "apiversion": "2020-12-01", "name": "[variables('webappname')]", "location": "[parameters('location')]", "kind": "app", "properties": {"httpsonly": true, "serverfarmid": "[resourceid('microsoft.web/serverfarms", format('plan-{0}", variables('basename')))]", "virtualnetworksubnetid": "[variables('appserviceintegrationsubnetid')]", "siteconfig": {"vnetrouteallenabled": true}}, "identity": {"type": "systemassigned"}, "dependson": ["[resourceid('microsoft.network/virtualnetworks", variables('vnetname'))]", "[resourceid('microsoft.web/serverfarms", format('plan-{0}", variables('basename')))]"]}{"type": "microsoft.web/sites/config", "apiversion": "2021-01-15", "name": "[format('{0}/appsettings", variables('webappname'))]", "properties": {"appinsights_instrumentationkey": "[format('@microsoft.keyvault(secreturi={0})", reference(resourceid('microsoft.keyvault/vaults/secrets", variables('keyvaultname'), format('kvs-{0}-aikey", variables('basename')))).secreturi)]"}, "dependson": ["[resourceid('microsoft.keyvault/vaults/secrets", variables('keyvaultname'), format('kvs-{0}-aikey", variables('basename')))]", "[resourceid('microsoft.web/sites", variables('webappname'))]"]}
This template creates an Azure Notification Hub. Template originally authored by John Downs.
{"type": "microsoft.notificationhubs/namespaces", "apiversion": "2017-04-01", "name": "[parameters('namespacename')]", "location": "[parameters('location')]", "sku": {"name": "free"}, "kind": "notificationhub", "resources": [{"type": "microsoft.notificationhubs/namespaces/notificationhubs", "apiversion": "2017-04-01", "name": "[concat(parameters('namespacename'), "/", variables('hubname'))]", "location": "[parameters('location')]", "dependson": ["[parameters('namespacename')]"]}]}
Deploys a Log Analytics workspace with VM Insights, Container Insights solutions and diagnostics.
{"type": "microsoft.insights/diagnosticsettings", "apiversion": "2017-05-01-preview", "scope": "[format('microsoft.operationalinsights/workspaces/{0}", parameters('loganalyticsworkspacename'))]", "name": "diagnosticsettings", "properties": {"workspaceid": "[resourceid('microsoft.operationalinsights/workspaces", parameters('loganalyticsworkspacename'))]", "logs": [{"category": "audit", "enabled": true, "retentionpolicy": {"days": 7, "enabled": true}}], "metrics": [{"category": "allmetrics", "enabled": true, "retentionpolicy": {"days": 7, "enabled": true}}]}, "dependson": ["[resourceid('microsoft.operationalinsights/workspaces", parameters('loganalyticsworkspacename'))]"]}
This template creates an Application Insights availability test along with a metric alert rule that monitors it.
{"name": "[variables('pingtestname')]", "type": "microsoft.insights/webtests", "apiversion": "2015-05-01", "location": "[parameters('location')]", "tags": {"[concat('hidden-link:", parameters('appinsightsresource'))]": "resource"}, "properties": {"name": "[variables('pingtestname')]", "description": "basic ping test", "enabled": true, "frequency": 300, "timeout": 120, "kind": "ping", "retryenabled": true, "locations": [{"id": "[parameters('webtestlocations')]"}], "configuration": {"webtest": "[concat(\"<webtest name="\", variables(\"pingtestname\'), \"" enabled="true" cssprojectstructure="" cssiteration="" timeout="120" workitemids="" xmlns="http://microsoft.com/schemas/visualstudio/teamtest/2010" description="" credentialusername="" credentialpassword="" preauthenticate="true" proxy="default" stoponerror="false" recordedresultfile="" resultslocale=""> <items> <request method="get" version="1.1" url="\", parameters(\"pingurl\'), \"" thinktime="0" timeout="300" parsedependentrequests="true" followredirects="true" recordresult="true" cache="false" responsetimegoal="0" encoding="utf-8" expectedhttpstatuscode="200" expectedresponseurl="" reportingname="" ignorehttpstatuscode="false" /> </items> <validationrules> <validationrule classname="microsoft.visualstudio.testtools.webtesting.rules.validationrulefindtext, microsoft.visualstudio.qualitytools.webtestframework, version=10.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" displayname="find text" description="verifies the existence of the specified text in the response." level="high" executionorder="beforedependents"> <ruleparameters> <ruleparameter name="findtext" value="\", parameters(\"pingtext\'), \"" /> <ruleparameter name="ignorecase" value="false" /> <ruleparameter name="useregularexpression" value="false" /> <ruleparameter name="passiftextfound" value="true" /> </ruleparameters> </validationrule> </validationrules> </webtest>\')]"}, "syntheticmonitorid": "[variables('pingtestname')]"}}{"name": "[variables('pingalertrulename')]", "type": "microsoft.insights/metricalerts", "apiversion": "2018-03-01", "location": "global", "dependson": ["[resourceid('microsoft.insights/webtests", variables('pingtestname'))]"], "tags": {"[concat('hidden-link:", parameters('appinsightsresource'))]": "resource", "[concat('hidden-link:", resourceid('microsoft.insights/webtests", variables('pingtestname')))]": "resource"}, "properties": {"description": "alert for web test", "severity": 1, "enabled": true, "scopes": ["[resourceid('microsoft.insights/webtests",variables('pingtestname'))]", "[parameters('appinsightsresource')]"], "evaluationfrequency": "pt1m", "windowsize": "pt5m", "criteria": {"odata.type": "microsoft.azure.monitor.webtestlocationavailabilitycriteria", "webtestid": "[resourceid('microsoft.insights/webtests", variables('pingtestname'))]", "componentid": "[parameters('appinsightsresource')]", "failedlocationcount": 2}}}
This template creates a metric alert rule that monitors the CPU Percentage metric of a virtual machine using a dynamic threshold condition type.
{"name": "[parameters('alertname')]", "type": "microsoft.insights/metricalerts", "location": "global", "apiversion": "2018-03-01", "properties": {"description": "[parameters('alertdescription')]", "severity": "[parameters('alertseverity')]", "enabled": "[parameters('isenabled')]", "scopes": ["[parameters('resourceid')]"], "evaluationfrequency": "[parameters('evaluationfrequency')]", "windowsize": "[parameters('windowsize')]", "criteria": {"odata.type": "microsoft.azure.monitor.multipleresourcemultiplemetriccriteria", "allof": [{"criteriontype": "dynamicthresholdcriterion", "name": "1st criterion", "metricname": "[parameters('metricname')]", "operator": "[parameters('operator')]", "alertsensitivity": "[parameters('alertsensitivity')]", "failingperiods": {"numberofevaluationperiods": "[parameters('numberofevaluationperiods')]", "minfailingperiodstoalert": "[parameters('minfailingperiodstoalert')]"}, "ignoredatabefore": "[parameters('ignoredatabefore')]", "timeaggregation": "[parameters('timeaggregation')]"}]}}}
This template creates a metric alert rule that monitors the CPU Percentage metric of a virtual machine using a static threshold condition type.
{"name": "[parameters('alertname')]", "type": "microsoft.insights/metricalerts", "location": "global", "apiversion": "2018-03-01", "properties": {"description": "[parameters('alertdescription')]", "severity": "[parameters('alertseverity')]", "enabled": "[parameters('isenabled')]", "scopes": ["[parameters('resourceid')]"], "evaluationfrequency": "[parameters('evaluationfrequency')]", "windowsize": "[parameters('windowsize')]", "criteria": {"odata.type": "microsoft.azure.monitor.singleresourcemultiplemetriccriteria", "allof": [{"name": "1st criterion", "metricname": "[parameters('metricname')]", "operator": "[parameters('operator')]", "threshold": "[parameters('threshold')]", "timeaggregation": "[parameters('timeaggregation')]"}]}}}
Deploys a Log Analytics workspace with specified solutions and data sources
{"condition": "[parameters('enablediagnostics')]", "type": "microsoft.insights/diagnosticsettings", "apiversion": "2021-05-01-preview", "scope": "[format('microsoft.operationalinsights/workspaces/{0}", parameters('name'))]", "name": "[variables('diagnosticsname')]", "properties": {"workspaceid": "[resourceid('microsoft.operationalinsights/workspaces", parameters('name'))]", "storageaccountid": "[resourceid(parameters('diagnosticstorageaccountresourcegroup'), "microsoft.storage/storageaccounts", parameters('diagnosticstorageaccountname'))]", "logs": [{"category": "audit", "enabled": true}], "metrics": [{"category": "allmetrics", "enabled": true}]}, "dependson": ["[resourceid('microsoft.operationalinsights/workspaces", parameters('name'))]"]}