Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit e368aa0

Browse files
committed
update deployment template:
Split the deployment of appservcice and azurebot Add AzureBotRegion
1 parent 4029851 commit e368aa0

36 files changed

+2778
-1656
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"azureBotId": {
6+
"value": ""
7+
},
8+
"azureBotSku": {
9+
"value": "S1"
10+
},
11+
"azureBotRegion": {
12+
"value": "global"
13+
},
14+
"botEndpoint": {
15+
"value": ""
16+
},
17+
"appType": {
18+
"value": "MultiTenant"
19+
},
20+
"appId": {
21+
"value": ""
22+
},
23+
"UMSIName": {
24+
"value": ""
25+
},
26+
"UMSIResourceGroupName": {
27+
"value": ""
28+
},
29+
"tenantId": {
30+
"value": ""
31+
}
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"appServiceName": {
6+
"value": ""
7+
},
8+
"existingAppServicePlanName": {
9+
"value": ""
10+
},
11+
"existingAppServicePlanLocation": {
12+
"value": ""
13+
},
14+
"newAppServicePlanName": {
15+
"value": ""
16+
},
17+
"newAppServicePlanLocation": {
18+
"value": ""
19+
},
20+
"newAppServicePlanSku": {
21+
"value": {
22+
"name": "S1",
23+
"tier": "Standard",
24+
"size": "S1",
25+
"family": "S",
26+
"capacity": 1
27+
}
28+
},
29+
"appType": {
30+
"value": "MultiTenant"
31+
},
32+
"appId": {
33+
"value": ""
34+
},
35+
"appSecret": {
36+
"value": ""
37+
},
38+
"UMSIName": {
39+
"value": ""
40+
},
41+
"UMSIResourceGroupName": {
42+
"value": ""
43+
},
44+
"tenantId": {
45+
"value": ""
46+
}
47+
}
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
Need deploy BotAppService before AzureBot
2+
---
3+
az login
4+
az deployment group create --resource-group <group-name> --template-file <template-file> --parameters @<parameters-file>
5+
---
6+
7+
# parameters-for-template-BotApp-with-rg:
8+
9+
**appServiceName**:(required) The Name of the Bot App Service.
10+
11+
(choose an existingAppServicePlan or create a new AppServicePlan)
12+
**existingAppServicePlanName**: The name of the App Service Plan.
13+
**existingAppServicePlanLocation**: The location of the App Service Plan.
14+
**newAppServicePlanName**: The name of the App Service Plan.
15+
**newAppServicePlanLocation**: The location of the App Service Plan.
16+
**newAppServicePlanSku**: The SKU of the App Service Plan. Defaults to Standard values.
17+
18+
**appType**: Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. **Allowed values are: MultiTenant(default), SingleTenant, UserAssignedMSI.**
19+
**appId**:(required) Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings.
20+
**appSecret**:(required for MultiTenant and SingleTenant) Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings.
21+
**UMSIName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource used for the Bot's Authentication.
22+
**UMSIResourceGroupName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource Group used for the Bot's Authentication.
23+
**tenantId**: 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>.
24+
-- MoreInfo: https://docs.microsoft.com/en-us/azure/bot-service/tutorial-provision-a-bot?view=azure-bot-service-4.0&tabs=userassigned%2Cnewgroup#create-an-identity-resource
25+
26+
27+
28+
# parameters-for-template-AzureBot-with-rg:
29+
30+
**azureBotId**:(required) The globally unique and immutable bot ID.
31+
**azureBotSku**: The pricing tier of the Bot Service Registration. **Allowed values are: F0, S1(default)**.
32+
**azureBotRegion**: Specifies the location of the new AzureBot. **Allowed values are: global(default), westeurope**.
33+
**botEndpoint**: Use to handle client messages, Such as https://<botappServiceName>.azurewebsites.net/api/messages.
34+
35+
**appType**: Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. **Allowed values are: MultiTenant(default), SingleTenant, UserAssignedMSI.**
36+
**appId**:(required) Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings.
37+
**UMSIName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource used for the Bot's Authentication.
38+
**UMSIResourceGroupName**:(required for UserAssignedMSI) The User-Assigned Managed Identity Resource Group used for the Bot's Authentication.
39+
**tenantId**: 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>.
40+
-- MoreInfo: https://docs.microsoft.com/en-us/azure/bot-service/tutorial-provision-a-bot?view=azure-bot-service-4.0&tabs=userassigned%2Cnewgroup#create-an-identity-resource
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"azureBotId": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "The globally unique and immutable bot ID."
9+
}
10+
},
11+
"azureBotSku": {
12+
"defaultValue": "S1",
13+
"type": "string",
14+
"metadata": {
15+
"description": "The pricing tier of the Bot Service Registration. Allowed values are: F0, S1(default)."
16+
}
17+
},
18+
"azureBotRegion": {
19+
"type": "string",
20+
"defaultValue": "global",
21+
"metadata": {
22+
"description": "Specifies the location of the new AzureBot. Allowed values are: global(default), westeurope."
23+
}
24+
},
25+
"botEndpoint": {
26+
"type": "string",
27+
"metadata": {
28+
"description": "Use to handle client messages, Such as https://<botappServiceName>.azurewebsites.net/api/messages."
29+
}
30+
},
31+
"appType": {
32+
"type": "string",
33+
"defaultValue": "MultiTenant",
34+
"allowedValues": [
35+
"MultiTenant",
36+
"SingleTenant",
37+
"UserAssignedMSI"
38+
],
39+
"metadata": {
40+
"description": "Type of Bot Authentication. set as MicrosoftAppType in the Web App's Application Settings. Allowed values are: MultiTenant, SingleTenant, UserAssignedMSI. Defaults to \"MultiTenant\"."
41+
}
42+
},
43+
"appId": {
44+
"type": "string",
45+
"metadata": {
46+
"description": "Active Directory App ID or User-Assigned Managed Identity Client ID, set as MicrosoftAppId in the Web App's Application Settings."
47+
}
48+
},
49+
"UMSIName": {
50+
"type": "string",
51+
"defaultValue": "",
52+
"metadata": {
53+
"description": "The User-Assigned Managed Identity Resource used for the Bot's Authentication."
54+
}
55+
},
56+
"UMSIResourceGroupName": {
57+
"type": "string",
58+
"defaultValue": "",
59+
"metadata": {
60+
"description": "The User-Assigned Managed Identity Resource Group used for the Bot's Authentication."
61+
}
62+
},
63+
"tenantId": {
64+
"type": "string",
65+
"defaultValue": "[subscription().tenantId]",
66+
"metadata": {
67+
"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\"."
68+
}
69+
}
70+
},
71+
"variables": {
72+
"tenantId": "[if(empty(parameters('tenantId')), subscription().tenantId, parameters('tenantId'))]",
73+
"msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName'))]",
74+
"appTypeDef": {
75+
"MultiTenant": {
76+
"tenantId": "",
77+
"msiResourceId": ""
78+
},
79+
"SingleTenant": {
80+
"tenantId": "[variables('tenantId')]",
81+
"msiResourceId": ""
82+
},
83+
"UserAssignedMSI": {
84+
"tenantId": "[variables('tenantId')]",
85+
"msiResourceId": "[variables('msiResourceId')]"
86+
}
87+
},
88+
"appType": {
89+
"tenantId": "[variables('appTypeDef')[parameters('appType')].tenantId]",
90+
"msiResourceId": "[variables('appTypeDef')[parameters('appType')].msiResourceId]"
91+
}
92+
},
93+
"resources": [
94+
{
95+
"apiVersion": "2021-05-01-preview",
96+
"type": "Microsoft.BotService/botServices",
97+
"name": "[parameters('azureBotId')]",
98+
"location": "[parameters('azureBotRegion')]",
99+
"kind": "azurebot",
100+
"sku": {
101+
"name": "[parameters('azureBotSku')]"
102+
},
103+
"properties": {
104+
"displayName": "[parameters('azureBotId')]",
105+
"iconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png",
106+
"endpoint": "[parameters('botEndpoint')]",
107+
"msaAppId": "[parameters('appId')]",
108+
"msaAppTenantId": "[variables('appType').tenantId]",
109+
"msaAppMSIResourceId": "[variables('appType').msiResourceId]",
110+
"msaAppType": "[parameters('appType')]",
111+
"luisAppIds": [],
112+
"schemaTransformationVersion": "1.3",
113+
"isCmekEnabled": false,
114+
"isIsolated": false
115+
},
116+
"dependsOn": []
117+
}
118+
]
119+
}

0 commit comments

Comments
 (0)