这是最新发布的2014-06-01 版本 API 的解决方案。
"resources": [
{
"apiVersion": "2014-06-01",
"name": "[parameters('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[parameters('webSiteLocation')]",
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('webSiteHostingPlanName'))]": "Resource",
"displayName": "WebSite"
},
"dependsOn": [
"[concat('Microsoft.Web/serverfarms/', parameters('webSiteHostingPlanName'))]"
],
"properties": {
"name": "[parameters('webSiteName')]",
"serverFarm": "[parameters('webSiteHostingPlanName')]"
},
"resources": [
{
"apiVersion": "2014-04-01",
"name": "MSDeploy",
"type": "extensions",
"dependsOn": [
"[concat('Microsoft.Web/Sites/', parameters('webSiteName'))]"
],
"properties": {
"packageUri": "[concat(parameters('dropLocation'), '/', parameters('webSitePackage'), parameters('dropLocationSasToken'))]",
"dbType": "None",
"connectionString": "",
"setParameters": {
"IIS Web Application Name": "[parameters('webSiteName')]"
}
}
},
{
"apiVersion": "2014-04-01",
"name": "web",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('webSiteName'))]"
],
"properties": {
"connectionStrings": [
{
"ConnectionString": "AzureWebJobsStorage",
"Name": "CustomConnectionString1"
},
{
"ConnectionString": "AzureWebJobsStorage",
"Name": "CustomConnectionString2"
}
],
"appSettings": [
{
"Name": "Key1",
"Value": "Value1"
},
{
"Name": "Key2",
"Value": "Value2"
}
]
}
}
]
},