Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appInsightsLocation": {
"value": "westus2"
},
"contentModeratorLocation": {
"value": "westus"
},
"luisServiceLocation": {
"value": "westus"
},
"qnaServiceLocation": {
"value": "westus"
},
"qnaMakerSearchSku": {
"value": "basic"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,365 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string",
"defaultValue": "[resourceGroup().name]"
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
},
"microsoftAppId": {
"type": "string"
},
"microsoftAppPassword": {
"type": "string"
},
"cosmosDbName": {
"type": "string",
"defaultValue": "[toLower(parameters('name'))]"
},
"storageAccountName": {
"type": "string",
"defaultValue": "[toLower(parameters('name'))]"
},
"appServicePlanName": {
"type": "string",
"defaultValue": "[parameters('name')]"
},
"appServicePlanSku": {
"type": "object",
"defaultValue": {
"tier": "Standard",
"name": "S1"
}
},
"appInsightsName": {
"type": "string",
"defaultValue": "[parameters('name')]"
},
"appInsightsLocation": {
"type": "string",
"defaultValue": "westus2"
},
"botWebAppName": {
"type": "string",
"defaultValue": "[parameters('name')]"
},
"botServiceName": {
"type": "string",
"defaultValue": "[parameters('name')]"
},
"botServiceSku": {
"type": "string",
"defaultValue": "S1"
},
"contentModeratorName": {
"type": "string",
"defaultValue": "[concat(parameters('name'), '-cm')]"
},
"contentModeratorSku": {
"type": "string",
"defaultValue": "S0"
},
"contentModeratorLocation": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
},
"luisServiceName": {
"type": "string",
"defaultValue": "[concat(parameters('name'), '-luis')]"
},
"luisServiceSku": {
"type": "string",
"defaultValue": "S0"
},
"luisServiceLocation": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
},
"qnaMakerServiceName": {
"type": "string",
"defaultValue": "[concat(parameters('name'), '-qna')]"
},
"qnaMakerServiceSku": {
"type": "string",
"defaultValue": "S0"
},
"qnaServiceLocation": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
},
"qnaMakerSearchName": {
"type": "string",
"defaultValue": "[toLower(concat(parameters('name'), '-search'))]"
},
"qnaMakerSearchSku": {
"type": "string",
"defaultValue": "basic"
},
"qnaMakerWebAppName": {
"type": "string",
"defaultValue": "[concat(parameters('name'), '-qnahost')]"
}
},
"variables": {
"botEndpoint": "[concat('https://', toLower(parameters('botWebAppName')), '.azurewebsites.net/api/messages')]",
"cleanStorageAccountName": "[toLower(take(replace(replace(parameters('storageAccountName'), '-', ''), '_', ''), 24))]"
},
"resources": [
{
"apiVersion": "2018-02-01",
"name": "3822b5f4-d098-4b57-9ee6-3bee686aec4c",
"type": "Microsoft.Resources/deployments",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": []
}
}
},
{
"comments": "CosmosDB for bot state.",
"type": "Microsoft.DocumentDB/databaseAccounts",
"kind": "GlobalDocumentDB",
"apiVersion": "2015-04-08",
"name": "[parameters('cosmosDbName')]",
"location": "[parameters('location')]",
"properties": {
"databaseAccountOfferType": "Standard",
"locations": [
{
"locationName": "[parameters('location')]",
"failoverPriority": 0
}
]
}
},
{
"comments": "storage account",
"type": "Microsoft.Storage/storageAccounts",
"kind": "StorageV2",
"apiVersion": "2018-07-01",
"name": "[variables('cleanStorageAccountName')]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard_LRS"
}
},
{
"comments": "app service plan",
"type": "Microsoft.Web/serverFarms",
"apiVersion": "2018-02-01",
"name": "[parameters('appServicePlanName')]",
"location": "[parameters('location')]",
"sku": "[parameters('appServicePlanSku')]",
"properties": {}
},
{
"comments": "app insights",
"type": "Microsoft.Insights/components",
"kind": "web",
"apiVersion": "2015-05-01",
"name": "[parameters('appInsightsName')]",
"location": "[parameters('appInsightsLocation')]",
"properties": {
"Application_Type": "web"
}
},
{
"comments": "bot web app",
"type": "Microsoft.Web/sites",
"apiVersion": "2018-02-01",
"name": "[parameters('botWebAppName')]",
"location": "[parameters('location')]",
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('appServicePlanName'))]",
"siteConfig": {
"appSettings": [
{
"name": "MicrosoftAppId",
"value": "[parameters('microsoftAppId')]"
},
{
"name": "MicrosoftAppPassword",
"value": "[parameters('microsoftAppPassword')]"
}
]
}
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('appServicePlanName'))]"
]
},
{
"comments": "bot service",
"type": "Microsoft.BotService/botServices",
"kind": "sdk",
"apiVersion": "2018-07-12",
"name": "[parameters('botServiceName')]",
"location": "global",
"sku": {
"name": "[parameters('botServiceSku')]"
},
"properties": {
"displayName": "[parameters('botServiceName')]",
"endpoint": "[variables('botEndpoint')]",
"msaAppId": "[parameters('microsoftAppId')]",
"developerAppInsightKey": "[reference(resourceId('Microsoft.Insights/components', parameters('appInsightsName'))).InstrumentationKey]",
"developerAppInsightsApplicationId": "[reference(resourceId('Microsoft.Insights/components', parameters('appInsightsName'))).ApplicationId]"
}
},
{
"comments": "Content Moderator service for detecting PII and racy content.",
"type": "Microsoft.CognitiveServices/accounts",
"kind": "ContentModerator",
"apiVersion": "2017-04-18",
"name": "[parameters('contentModeratorName')]",
"location": "[parameters('contentModeratorLocation')]",
"sku": {
"name": "[parameters('contentModeratorSku')]"
}
},
{
"comments": "Cognitive service key for all LUIS apps.",
"type": "Microsoft.CognitiveServices/accounts",
"kind": "LUIS",
"apiVersion": "2017-04-18",
"name": "[parameters('luisServiceName')]",
"location": "[parameters('luisServiceLocation')]",
"sku": {
"name": "[parameters('luisServiceSku')]"
}
},
{
"comments": "Cognitive service key for all QnA Maker knowledgebases.",
"type": "Microsoft.CognitiveServices/accounts",
"kind": "QnAMaker",
"apiVersion": "2017-04-18",
"name": "[parameters('qnaMakerServiceName')]",
"location": "[parameters('qnaServiceLocation')]",
"sku": {
"name": "[parameters('qnaMakerServiceSku')]"
},
"properties": {
"apiProperties": {
"qnaRuntimeEndpoint": "[concat('https://',reference(resourceId('Microsoft.Web/sites', parameters('qnaMakerWebAppName'))).hostNames[0])]"
}
},
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('qnaMakerWebAppName'))]",
"[resourceId('Microsoft.Search/searchServices/', parameters('qnaMakerSearchName'))]",
"[resourceId('microsoft.insights/components/', parameters('appInsightsName'))]"
]
},
{
"comments": "Search service for QnA Maker service.",
"type": "Microsoft.Search/searchServices",
"apiVersion": "2015-08-19",
"name": "[parameters('qnaMakerSearchName')]",
"location": "[parameters('qnaServiceLocation')]",
"sku": {
"name": "[parameters('qnaMakerSearchSku')]"
},
"properties": {
"replicaCount": 1,
"partitionCount": 1,
"hostingMode": "default"
}
},
{
"comments": "Web app for QnA Maker service.",
"type": "Microsoft.Web/sites",
"apiVersion": "2016-08-01",
"name": "[parameters('qnaMakerWebAppName')]",
"location": "[parameters('qnaServiceLocation')]",
"properties": {
"enabled": true,
"name": "[parameters('qnaMakerWebAppName')]",
"hostingEnvironment": "",
"serverFarmId": "[concat('/subscriptions/', subscription().id,'/resourcegroups/', resourceGroup().name, '/providers/Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]",
"siteConfig": {
"cors": {
"allowedOrigins": [
"*"
]
}
}
},
"dependsOn": [
"[concat('Microsoft.Web/serverfarms/', parameters('appServicePlanName'))]"
],
"resources": [
{
"apiVersion": "2016-08-01",
"name": "appsettings",
"type": "config",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('qnaMakerWebAppName'))]",
"[resourceId('Microsoft.Insights/components', parameters('appInsightsName'))]",
"[resourceId('Microsoft.Search/searchServices/', parameters('qnaMakerSearchName'))]"
],
"properties": {
"AzureSearchName": "[parameters('qnaMakerSearchName')]",
"AzureSearchAdminKey": "[listAdminKeys(resourceId('Microsoft.Search/searchServices/', parameters('qnaMakerSearchName')), '2015-08-19').primaryKey]",
"UserAppInsightsKey": "[reference(resourceId('Microsoft.Insights/components/', parameters('appInsightsName')), '2015-05-01').InstrumentationKey]",
"UserAppInsightsName": "[parameters('appInsightsName')]",
"UserAppInsightsAppId": "[reference(resourceId('Microsoft.Insights/components/', parameters('appInsightsName')), '2015-05-01').AppId]",
"PrimaryEndpointKey": "[concat(parameters('qnaMakerWebAppName'), '-PrimaryEndpointKey')]",
"SecondaryEndpointKey": "[concat(parameters('qnaMakerWebAppName'), '-SecondaryEndpointKey')]",
"DefaultAnswer": "No good match found in KB.",
"QNAMAKER_EXTENSION_VERSION": "latest"
}
}
]
}
],
"outputs": {
"appInsights": {
"type": "object",
"value": {
"appId": "[reference(resourceId('Microsoft.Insights/components', parameters('appInsightsName'))).AppId]",
"instrumentationKey": "[reference(resourceId('Microsoft.Insights/components', parameters('appInsightsName'))).InstrumentationKey]"
}
},
"storage": {
"type": "object",
"value": {
"connectionString": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('cleanStorageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('cleanStorageAccountName')), '2018-07-01').keys[0].value, ';EndpointSuffix=core.windows.net')]",
"container": "transcripts"
}
},
"cosmosDb": {
"type": "object",
"value": {
"cosmosDBEndpoint": "[reference(resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('cosmosDbName'))).documentEndpoint]",
"authkey": "[listKeys(resourceId('Microsoft.DocumentDB/databaseAccounts', parameters('cosmosDbName')), '2015-04-08').primaryMasterKey]",
"databaseId": "botstate-db",
"collectionId": "botstate-collection"
}
},
"luis": {
"type": "object",
"value": {
"key": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', parameters('luisServiceName')),'2017-04-18').key1]"
}
},
"qnaMaker": {
"type": "object",
"value": {
"endpoint": "[concat('https://', reference(resourceId('Microsoft.Web/sites', parameters('qnaMakerWebAppName'))).hostNames[0])]",
"key": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', parameters('qnaMakerServiceName')),'2017-04-18').key1]"
}
},
"contentModerator": {
"type": "object",
"value": {
"key": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', parameters('contentModeratorName')),'2017-04-18').key1]"
}
}
}
}
Loading