Skip to content

Instantly share code, notes, and snippets.

@MarcusFelling
Last active March 2, 2021 17:50
Show Gist options
  • Save MarcusFelling/0688af69372e5f391a4ea3c7eeaf94ed to your computer and use it in GitHub Desktop.
Save MarcusFelling/0688af69372e5f391a4ea3c7eeaf94ed to your computer and use it in GitHub Desktop.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appName": {
"type": "string"
},
"sku": {
"type": "string",
"defaultValue": "F1",
"metadata": {
"description": "The SKU of App Service Plan."
}
},
"packageUrl": {
"type": "string",
"defaultValue": "https://github.com/Azure-Samples/communication-services-web-calling-hero/releases/download/58f87c2/Calling-58f87c2.zip"
}
},
"variables": {
"location": "[resourceGroup().location]",
"commsName": "[concat('CommunicationServices-', parameters('appName'))]",
"appServicePlanPortalName": "[concat('AppServicePlan-', parameters('appName'))]"
},
"resources": [
{
"name": "[variables('commsName')]",
"type": "Microsoft.Communication/communicationServices",
"apiVersion": "2020-08-20-preview",
"location": "global",
"tags": {
},
"properties": {
"dataLocation": "United States"
}
},
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2020-06-01",
"name": "[variables('appServicePlanPortalName')]",
"location": "[resourceGroup().location]",
"sku": {
"name": "[parameters('sku')]"
}
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2020-06-01",
"name": "[parameters('appName')]",
"location": "[variables('location')]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]",
"[resourceId('Microsoft.Communication/communicationServices', variables('commsName'))]"
],
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]"
},
"resources": [
{
"name": "appsettings",
"type": "config",
"apiVersion": "2018-11-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('appName'))]"
],
"tags": {
"displayName": "appsettings"
},
"properties": {
"ResourceConnectionString": "[listkeys(variables('commsName'), '2020-08-20-preview' ).primaryConnectionString]",
"WEBSITE_NODE_DEFAULT_VERSION": "12.13.0"
}
},
{
"name": "MSDeploy",
"type": "extensions",
"location": "[resourceGroup().location]",
"apiVersion": "2018-11-01",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('appName'))]",
"[resourceId('Microsoft.Web/sites/config', parameters('appName'), 'appsettings')]"
],
"properties": {
"packageUri": "[parameters('packageUrl')]"
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment