{ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "environmentName": { "type": "string", "metadata": { "description": "Name of the environment to create. This will result in resources named like {environmentName}-CSWebJob" } }, "webEdition": { "defaultValue": "Basic", "allowedValues": [ "Free", "Shared", "Basic", "Standard", "Premium" ], "type": "string", "metadata": { "description": "The pricing tier for the hosting plan." } }, "webAppSize": { "defaultValue": "0", "allowedValues": [ "0", "1", "2" ], "type": "string", "metadata": { "description": "The instance size of the hosting plan (small, medium, or large)." } }, "region": { "defaultValue": "West US", "type": "string", "metadata": { "description": "The location of the database server. For best performance, this location should be the same as the location of the web app." } }, "enableAPM": { "type": "string", "metadata": { "description": "Determines if the AppSettings for AppDynamics will be configured" } "defaultValue": "No", "allowedValues": [ "No", "Yes" ] } }, "variables": { "contactServiceName": "[concat(parameters('environmentName'),'-ContactService')]", "siteName": "[concat(parameters('environmentName'),'-ContactService')]", "azureHttpsHeader": "[concat('https://',parameters('environmentName'))]" }, "resources": [ { "comments": "App Service Plan for Contact Service", "type": "Microsoft.Web/serverfarms", "name": "[variables('contactServiceName')]", "apiVersion": "2014-06-01", "location": "[parameters('region')]", "properties": { "name": "[variables('contactServiceName')]", "sku": "[parameters('webEdition')]", "workerSize": "[parameters('webAppSize')]", "numberOfWorkers": 1 }, "dependsOn": [] }, { "comments": "App Service for Contact Service", "type": "Microsoft.Web/sites", "name": "[variables('contactServiceName')]", "apiVersion": "2015-08-01", "location": "[parameters('region')]", "tags": { "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', variables('contactServiceName'))]": "empty" }, "properties": { "name": "[variables('contactServiceName')]", "serverFarmId": "[variables('contactServiceName')]", "siteConfig": { "AlwaysOn": true } }, "resources": [ { "apiVersion": "2015-08-01", "name": "AppDynamics.WindowsAzure.SiteExtension.4.4.Release", "type": "siteextensions", "dependsOn": [ "[variables('contactServiceName')]" ] }, { "comments": "AppSettings for Contact Service", "type": "config", "name": "appsettings", "apiVersion": "2015-08-01", "properties": { "Splunk.Host": "mysplunkhost", "Splunk.UseHttps": "true", "Splunk.Endpoint": "services/collector/event", "Splunk.Port": "18443", "Splunk.AccessToken": "114FB314-25C4-412A-82AC-9B7031A95A35", "Splunk.SourceType": "Azure:CSU:Service", "Splunk.Source": "[concat('ContactService:', parameters('environmentName'))]", "ApplicationInsightsKey": "[reference(concat('Microsoft.Insights/components/', variables('contactServiceName'))).InstrumentationKey]", "appdynamics.controller.hostName": "[if(equals(parameters('enableAPM'), 'Yes'), 'mySaaScontroller', '')]", "appdynamics.controller.port": "[if(equals(parameters('enableAPM'), 'Yes'), '443', '')]", "appdynamics.controller.ssl.enabled": "[if(equals(parameters('enableAPM'), 'Yes'), 'True', '')]", "appdynamics.agent.accountName": "[if(equals(parameters('enableAPM'), 'Yes'), 'mycompany', '')]", "appdynamics.agent.accountAccessKey": "[if(equals(parameters('enableAPM'), 'Yes'), 'mykey', '')]", "appdynamics.agent.applicationName": "[variables('contactServiceName')]" }, "dependsOn": [ "[concat('Microsoft.Web/sites/', variables('contactServiceName'))]" ] } ], "dependsOn": [ "[concat('Microsoft.Web/serverfarms/', variables('contactServiceName'))]" ] }, { "comments": "Application Insights for the Contact Service", "type": "Microsoft.Insights/components", "name": "[variables('contactServiceName')]", "apiVersion": "2014-04-01", "location": "eastus", "tags": { "[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', variables('contactServiceName'))]": "Resource" }, "properties": { "ApplicationId": "[variables('contactServiceName')]" }, "dependsOn": [ "[concat('Microsoft.Web/sites/', variables('contactServiceName'))]", "[concat('Microsoft.Web/serverfarms/', variables('contactServiceName'))]" ] } ] }