2017-05-13 17:01:46 +03:00
|
|
|
|
{
|
|
|
|
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
|
|
|
|
"contentVersion": "1.0.0.0",
|
|
|
|
|
"parameters": {
|
|
|
|
|
"appInsightsLocation": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"defaultValue": "South Central US",
|
|
|
|
|
"allowedValues": [
|
|
|
|
|
"South Central US",
|
|
|
|
|
"West Europe",
|
|
|
|
|
"East US",
|
|
|
|
|
"North Europe"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "Location for the instance of App Insights."
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"applicationId": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"applicationSecret": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"applicationTenantId": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"cacheSKUName": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"allowedValues": [
|
|
|
|
|
"Basic",
|
|
|
|
|
"Standard"
|
|
|
|
|
],
|
|
|
|
|
"defaultValue": "Basic",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The pricing tier of the new Azure Redis Cache."
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"cacheSKUFamily": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"allowedValues": [
|
|
|
|
|
"C"
|
|
|
|
|
],
|
|
|
|
|
"defaultValue": "C",
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The family for the SKU."
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"cacheSKUCapacity": {
|
|
|
|
|
"type": "int",
|
|
|
|
|
"allowedValues": [
|
|
|
|
|
0,
|
|
|
|
|
1,
|
|
|
|
|
2,
|
|
|
|
|
3,
|
|
|
|
|
4,
|
|
|
|
|
5,
|
|
|
|
|
6
|
|
|
|
|
],
|
|
|
|
|
"defaultValue": 0,
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "The size of the new Azure Redis Cache instance."
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"hostingPlanName": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"keyVaultSkuName": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"defaultValue": "Standard",
|
|
|
|
|
"allowedValues": [
|
|
|
|
|
"Standard",
|
|
|
|
|
"Premium"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "SKU for the vault"
|
|
|
|
|
}
|
|
|
|
|
},
|
2017-05-14 00:28:20 +03:00
|
|
|
|
"luisAccountName": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 3,
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "Name of the cognitive service instance"
|
|
|
|
|
}
|
|
|
|
|
},
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"luisAppId": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"luisApiKey": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"microsoftAppId": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"microsoftAppPassword": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"partnerCenterAccountId": {
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"partnerCenterApplicationId": {
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"partnerCenterApplicationSecret": {
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"qnAKnowledgebaseId": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"qnASubscriptionKey": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"repoUrl": {
|
2017-05-13 18:41:38 +03:00
|
|
|
|
"type": "string",
|
2017-05-13 20:04:21 +03:00
|
|
|
|
"defaultValue": "https://github.com/Microsoft/Partner-Center-Bot"
|
2017-05-13 17:01:46 +03:00
|
|
|
|
},
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"branch": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"defaultValue": "master"
|
|
|
|
|
},
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"siteName": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"minLength": 1
|
|
|
|
|
},
|
|
|
|
|
"skuName": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"defaultValue": "B1",
|
|
|
|
|
"allowedValues": [
|
|
|
|
|
"B1",
|
|
|
|
|
"B2",
|
|
|
|
|
"B3",
|
|
|
|
|
"S1",
|
|
|
|
|
"S2",
|
|
|
|
|
"S3",
|
|
|
|
|
"P1",
|
|
|
|
|
"P2",
|
|
|
|
|
"P3",
|
|
|
|
|
"P4"
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "Describes the plan's pricing tier and capacity. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"skuCapacity": {
|
|
|
|
|
"type": "int",
|
|
|
|
|
"defaultValue": 1,
|
|
|
|
|
"minValue": 1,
|
|
|
|
|
"metadata": {
|
|
|
|
|
"description": "Describes the plan's instance count"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"variables": {
|
|
|
|
|
"cacheName": "[concat('cache', uniqueString(resourceGroup().id))]",
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"identityResourceId": "[concat(resourceId('Microsoft.Web/sites', parameters('siteName')),'/providers/Microsoft.ManagedIdentity/Identities/default')]",
|
|
|
|
|
"keyVaultName": "[concat('vault', uniqueString(resourceGroup().id))]"
|
2017-05-13 17:01:46 +03:00
|
|
|
|
},
|
|
|
|
|
"resources": [
|
2017-05-14 00:28:20 +03:00
|
|
|
|
{
|
|
|
|
|
"type": "Microsoft.CognitiveServices/accounts",
|
|
|
|
|
"sku": {
|
|
|
|
|
"name": "F0"
|
|
|
|
|
},
|
|
|
|
|
"kind": "LUIS",
|
|
|
|
|
"name": "[parameters('luisAccountName')]",
|
|
|
|
|
"apiVersion": "2016-02-01-preview",
|
|
|
|
|
"location": "westus",
|
|
|
|
|
"properties": {},
|
|
|
|
|
"dependsOn": []
|
|
|
|
|
},
|
2017-05-13 17:01:46 +03:00
|
|
|
|
{
|
|
|
|
|
"type": "Microsoft.KeyVault/vaults",
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"name": "[variables('keyVaultName')]",
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"apiVersion": "2015-06-01",
|
|
|
|
|
"location": "[resourceGroup().location]",
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"tags": {},
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"properties": {
|
|
|
|
|
"sku": {
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"family": "A",
|
|
|
|
|
"name": "premium"
|
|
|
|
|
},
|
|
|
|
|
"tenantId": "[reference(variables('identityResourceId'), '2015-08-31-PREVIEW').tenantId]",
|
|
|
|
|
"accessPolicies": [
|
|
|
|
|
{
|
|
|
|
|
"tenantId": "[reference(variables('identityResourceId'), '2015-08-31-PREVIEW').tenantId]",
|
|
|
|
|
"objectId": "[reference(variables('identityResourceId'), '2015-08-31-PREVIEW').principalId]",
|
|
|
|
|
"permissions": {
|
|
|
|
|
"secrets": [
|
|
|
|
|
"get"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"enabledForDeployment": false
|
|
|
|
|
},
|
|
|
|
|
"dependsOn": [
|
|
|
|
|
"[concat('Microsoft.Web/sites/', parameters('siteName'))]"
|
|
|
|
|
]
|
2017-05-13 17:01:46 +03:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "Microsoft.KeyVault/vaults/secrets",
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"name": "[concat(variables('keyVaultName'), '/', 'ApplicationSecret')]",
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"apiVersion": "2015-06-01",
|
|
|
|
|
"properties": {
|
|
|
|
|
"contentType": "text/plain",
|
|
|
|
|
"value": "[parameters('applicationSecret')]"
|
|
|
|
|
},
|
|
|
|
|
"dependsOn": [
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"[concat('Microsoft.KeyVault/vaults/', variables('keyVaultName'))]"
|
2017-05-13 17:01:46 +03:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "Microsoft.KeyVault/vaults/secrets",
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"name": "[concat(variables('keyVaultName'), '/', 'LuisApiKey')]",
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"apiVersion": "2015-06-01",
|
|
|
|
|
"properties": {
|
|
|
|
|
"contentType": "text/plain",
|
|
|
|
|
"value": "[parameters('luisApiKey')]"
|
|
|
|
|
},
|
|
|
|
|
"dependsOn": [
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"[concat('Microsoft.KeyVault/vaults/', variables('keyVaultName'))]"
|
2017-05-13 17:01:46 +03:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "Microsoft.KeyVault/vaults/secrets",
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"name": "[concat(variables('keyVaultName'), '/', 'MicrosoftAppPassword')]",
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"apiVersion": "2015-06-01",
|
|
|
|
|
"properties": {
|
|
|
|
|
"contentType": "text/plain",
|
|
|
|
|
"value": "[parameters('microsoftAppPassword')]"
|
|
|
|
|
},
|
|
|
|
|
"dependsOn": [
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"[concat('Microsoft.KeyVault/vaults/', variables('keyVaultName'))]"
|
2017-05-13 17:01:46 +03:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "Microsoft.KeyVault/vaults/secrets",
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"name": "[concat(variables('keyVaultName'), '/', 'PartnerCenterApplicationSecret')]",
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"apiVersion": "2015-06-01",
|
|
|
|
|
"properties": {
|
|
|
|
|
"contentType": "text/plain",
|
|
|
|
|
"value": "[parameters('partnerCenterApplicationSecret')]"
|
|
|
|
|
},
|
|
|
|
|
"dependsOn": [
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"[concat('Microsoft.KeyVault/vaults/', variables('keyVaultName'))]"
|
2017-05-13 17:01:46 +03:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"type": "Microsoft.KeyVault/vaults/secrets",
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"name": "[concat(variables('keyVaultName'), '/', 'QnASubscriptionKey')]",
|
2017-05-13 17:01:46 +03:00
|
|
|
|
"apiVersion": "2015-06-01",
|
|
|
|
|
"properties": {
|
|
|
|
|
"contentType": "text/plain",
|
|
|
|
|
"value": "[parameters('qnASubscriptionKey')]"
|
|
|
|
|
},
|
|
|
|
|
"dependsOn": [
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"[concat('Microsoft.KeyVault/vaults/', variables('keyVaultName'))]"
|
2017-05-13 17:01:46 +03:00
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "[variables('cacheName')]",
|
|
|
|
|
"type": "Microsoft.Cache/Redis",
|
|
|
|
|
"location": "[resourceGroup().location]",
|
|
|
|
|
"apiVersion": "2016-04-01",
|
|
|
|
|
"dependsOn": [],
|
|
|
|
|
"tags": {
|
|
|
|
|
"displayName": "cache"
|
|
|
|
|
},
|
|
|
|
|
"properties": {
|
|
|
|
|
"sku": {
|
|
|
|
|
"name": "[parameters('cacheSKUName')]",
|
|
|
|
|
"family": "[parameters('cacheSKUFamily')]",
|
|
|
|
|
"capacity": "[parameters('cacheSKUCapacity')]"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"apiVersion": "2015-08-01",
|
|
|
|
|
"name": "[parameters('hostingPlanName')]",
|
|
|
|
|
"type": "Microsoft.Web/serverfarms",
|
|
|
|
|
"location": "[resourceGroup().location]",
|
|
|
|
|
"tags": {
|
|
|
|
|
"displayName": "HostingPlan"
|
|
|
|
|
},
|
|
|
|
|
"sku": {
|
|
|
|
|
"name": "[parameters('skuName')]",
|
|
|
|
|
"capacity": "[parameters('skuCapacity')]"
|
|
|
|
|
},
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": "[parameters('hostingPlanName')]"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"apiVersion": "2015-08-01",
|
|
|
|
|
"name": "[parameters('siteName')]",
|
|
|
|
|
"type": "Microsoft.Web/sites",
|
|
|
|
|
"location": "[resourceGroup().location]",
|
|
|
|
|
"tags": {
|
|
|
|
|
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "Resource",
|
|
|
|
|
"displayName": "Website"
|
|
|
|
|
},
|
|
|
|
|
"dependsOn": [
|
|
|
|
|
"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]"
|
|
|
|
|
],
|
|
|
|
|
"properties": {
|
|
|
|
|
"name": "[parameters('siteName')]",
|
|
|
|
|
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]"
|
|
|
|
|
},
|
|
|
|
|
"resources": [
|
|
|
|
|
{
|
|
|
|
|
"name": "web",
|
|
|
|
|
"type": "sourcecontrols",
|
|
|
|
|
"location": "[resourceGroup().location]",
|
|
|
|
|
"apiVersion": "2015-08-01",
|
|
|
|
|
"dependsOn": [
|
|
|
|
|
"[concat('Microsoft.Web/sites/', parameters('siteName'))]",
|
|
|
|
|
"[concat('Microsoft.Web/Sites/', parameters('siteName'), '/config/appsettings')]"
|
|
|
|
|
],
|
|
|
|
|
"tags": {
|
|
|
|
|
"displayName": "CustomerPortal"
|
|
|
|
|
},
|
|
|
|
|
"properties": {
|
|
|
|
|
"RepoUrl": "[parameters('repoUrl')]",
|
|
|
|
|
"branch": "[parameters('branch')]",
|
|
|
|
|
"IsManualIntegration": true
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "appsettings",
|
|
|
|
|
"type": "config",
|
|
|
|
|
"apiVersion": "2015-08-01",
|
|
|
|
|
"dependsOn": [
|
|
|
|
|
"[concat('Microsoft.Web/sites/', parameters('siteName'))]",
|
|
|
|
|
"[concat('Microsoft.Insights/components/', parameters('siteName'))]",
|
|
|
|
|
"[concat('Microsoft.Cache/Redis/', variables('cacheName'))]"
|
|
|
|
|
],
|
|
|
|
|
"tags": {
|
|
|
|
|
"displayName": "ApplicationSettings"
|
|
|
|
|
},
|
|
|
|
|
"properties": {
|
|
|
|
|
"ApplicationId": "[parameters('applicationId')]",
|
|
|
|
|
"ApplicationTenantId": "[parameters('applicationTenantId')]",
|
|
|
|
|
"InstrumentationKey": "[reference(concat('Microsoft.Insights/components/', parameters('siteName'))).InstrumentationKey]",
|
2018-04-04 07:43:04 +03:00
|
|
|
|
"PartnerCenter.AccountId": "[parameters('partnerCenterAccountId')]",
|
|
|
|
|
"PartnerCenter.ApplicationId": "[parameters('partnerCenterApplicationId')]",
|
|
|
|
|
"KeyVaultEndpoint": "[concat('https://', variables('keyVaultName'), '.vault.azure.net')]"
|
2017-05-13 17:01:46 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"apiVersion": "2014-04-01",
|
|
|
|
|
"name": "[parameters('siteName')]",
|
|
|
|
|
"type": "Microsoft.Insights/components",
|
|
|
|
|
"location": "[parameters('appInsightsLocation')]",
|
|
|
|
|
"tags": {
|
|
|
|
|
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('siteName'))]": "Resource",
|
|
|
|
|
"displayName": "AppInsightsComponent"
|
|
|
|
|
},
|
|
|
|
|
"properties": {
|
|
|
|
|
"applicationId": "[parameters('siteName')]"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"outputs": {
|
|
|
|
|
"WebsiteUrl": {
|
|
|
|
|
"type": "string",
|
|
|
|
|
"value": "[concat('https://',reference(resourceId('Microsoft.Web/sites', parameters('siteName'))).hostNames[0])]"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|