157 lines
5.3 KiB
JSON
157 lines
5.3 KiB
JSON
{
|
|
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {
|
|
"groupName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "Specifies the name of the Resource Group."
|
|
}
|
|
},
|
|
"groupLocation": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "Specifies the location of the Resource Group."
|
|
}
|
|
},
|
|
"azureBotId": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The globally unique and immutable bot ID."
|
|
}
|
|
},
|
|
"azureBotSku": {
|
|
"type": "string",
|
|
"defaultValue": "S1",
|
|
"metadata": {
|
|
"description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1."
|
|
}
|
|
},
|
|
"azureBotRegion": {
|
|
"type": "string",
|
|
"defaultValue": "global",
|
|
"metadata": {
|
|
"description": ""
|
|
}
|
|
},
|
|
"botEndpoint": {
|
|
"type": "string",
|
|
"defaultValue": "",
|
|
"metadata": {
|
|
"description": "Use to handle client messages, Such as https://<botappServiceName>.azurewebsites.net/api/messages."
|
|
}
|
|
},
|
|
"appType": {
|
|
"type": "string",
|
|
"defaultValue": "MultiTenant",
|
|
"allowedValues": [
|
|
"MultiTenant",
|
|
"SingleTenant",
|
|
"UserAssignedMSI"
|
|
],
|
|
"metadata": {
|
|
"description": "Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. Allowed values are: MultiTenant, SingleTenant, UserAssignedMSI. Defaults to \"MultiTenant\"."
|
|
}
|
|
},
|
|
"appId": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings."
|
|
}
|
|
},
|
|
"tenantId": {
|
|
"type": "string",
|
|
"defaultValue": "[subscription().tenantId]",
|
|
"metadata": {
|
|
"description": "The Azure AD Tenant ID to use as part of the Bot's Authentication. Only used for SingleTenant and UserAssignedMSI app types. Defaults to \"Subscription Tenant ID\"."
|
|
}
|
|
},
|
|
"UMSIName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The User-Assigned Managed Identity Resource used for the Bot's Authentication."
|
|
}
|
|
},
|
|
"UMSIResourceGroupName": {
|
|
"type": "string",
|
|
"metadata": {
|
|
"description": "The User-Assigned Managed Identity Resource Group used for the Bot's Authentication."
|
|
}
|
|
}
|
|
},
|
|
"variables": {
|
|
"tenantId": "[if(empty(parameters('tenantId')), subscription().tenantId, parameters('tenantId'))]",
|
|
"msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName'))]",
|
|
"appTypeDef": {
|
|
"MultiTenant": {
|
|
"tenantId": "",
|
|
"msiResourceId": ""
|
|
},
|
|
"SingleTenant": {
|
|
"tenantId": "[variables('tenantId')]",
|
|
"msiResourceId": ""
|
|
},
|
|
"UserAssignedMSI": {
|
|
"tenantId": "[variables('tenantId')]",
|
|
"msiResourceId": "[variables('msiResourceId')]"
|
|
}
|
|
},
|
|
"appType": {
|
|
"tenantId": "[variables('appTypeDef')[parameters('appType')].tenantId]",
|
|
"msiResourceId": "[variables('appTypeDef')[parameters('appType')].msiResourceId]"
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"name": "[parameters('groupName')]",
|
|
"type": "Microsoft.Resources/resourceGroups",
|
|
"apiVersion": "2018-05-01",
|
|
"location": "[parameters('groupLocation')]",
|
|
"properties": {}
|
|
},
|
|
{
|
|
"type": "Microsoft.Resources/deployments",
|
|
"apiVersion": "2018-05-01",
|
|
"name": "storageDeployment",
|
|
"resourceGroup": "[parameters('groupName')]",
|
|
"dependsOn": [
|
|
"[resourceId('Microsoft.Resources/resourceGroups/', parameters('groupName'))]"
|
|
],
|
|
"properties": {
|
|
"mode": "Incremental",
|
|
"template": {
|
|
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {},
|
|
"variables": {},
|
|
"resources": [
|
|
{
|
|
"apiVersion": "2021-03-01",
|
|
"type": "Microsoft.BotService/botServices",
|
|
"name": "[parameters('azureBotId')]",
|
|
"location": "[parameters('azureBotRegion')]",
|
|
"kind": "azurebot",
|
|
"sku": {
|
|
"name": "[parameters('azureBotSku')]"
|
|
},
|
|
"properties": {
|
|
"name": "[parameters('azureBotId')]",
|
|
"displayName": "[parameters('azureBotId')]",
|
|
"iconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png",
|
|
"endpoint": "[parameters('botEndpoint')]",
|
|
"msaAppId": "[parameters('appId')]",
|
|
"msaAppTenantId": "[variables('appType').tenantId]",
|
|
"msaAppMSIResourceId": "[variables('appType').msiResourceId]",
|
|
"msaAppType": "[parameters('appType')]",
|
|
"luisAppIds": [],
|
|
"schemaTransformationVersion": "1.3",
|
|
"isCmekEnabled": false,
|
|
"isIsolated": false
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |