-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.json
394 lines (394 loc) · 22.6 KB
/
main.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "4130888063370492952"
}
},
"parameters": {
"uniqueNameComponent": {
"type": "string",
"defaultValue": "[uniqueString(resourceGroup().id)]"
}
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2023-01-01",
"name": "[format('{0}storage', parameters('uniqueNameComponent'))]",
"location": "[resourceGroup().location]",
"kind": "StorageV2",
"sku": {
"name": "Standard_LRS"
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2019-04-01",
"name": "[format('{0}/{1}/{2}', format('{0}storage', parameters('uniqueNameComponent')), 'default', 'data')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.CognitiveServices/accounts",
"apiVersion": "2024-04-01-preview",
"name": "[format('{0}-aoai', parameters('uniqueNameComponent'))]",
"location": "eastus2",
"kind": "OpenAI",
"sku": {
"name": "S0"
},
"identity": {
"type": "SystemAssigned"
},
"properties": {
"customSubDomainName": "[format('{0}-aoai', parameters('uniqueNameComponent'))]"
}
},
{
"type": "Microsoft.CognitiveServices/accounts/deployments",
"apiVersion": "2024-04-01-preview",
"name": "[format('{0}/{1}', format('{0}-aoai', parameters('uniqueNameComponent')), 'gpt-4o')]",
"sku": {
"name": "GlobalStandard",
"capacity": 100
},
"properties": {
"model": {
"format": "OpenAI",
"name": "gpt-4o",
"version": "2024-05-13"
}
},
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.CognitiveServices/accounts/deployments",
"apiVersion": "2024-04-01-preview",
"name": "[format('{0}/{1}', format('{0}-aoai', parameters('uniqueNameComponent')), 'text-embedding-ada-002')]",
"sku": {
"name": "Standard",
"capacity": 100
},
"properties": {
"model": {
"format": "OpenAI",
"name": "text-embedding-ada-002",
"version": "2"
}
},
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent')))]",
"[resourceId('Microsoft.CognitiveServices/accounts/deployments', format('{0}-aoai', parameters('uniqueNameComponent')), 'gpt-4o')]"
]
},
{
"type": "Microsoft.Search/searchServices",
"apiVersion": "2024-03-01-preview",
"name": "[format('{0}-search', parameters('uniqueNameComponent'))]",
"location": "[resourceGroup().location]",
"sku": {
"name": "basic"
},
"identity": {
"type": "SystemAssigned"
},
"properties": {
"authOptions": {
"aadOrApiKey": {
"aadAuthFailureMode": "http401WithBearerChallenge"
}
}
}
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-04-01-preview",
"scope": "[format('Microsoft.Search/searchServices/{0}', format('{0}-search', parameters('uniqueNameComponent')))]",
"name": "[guid(resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', '1407120a-92aa-4202-b7e9-c0e197c71c8f'))]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '1407120a-92aa-4202-b7e9-c0e197c71c8f')]",
"principalId": "[reference(resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), '2024-04-01-preview', 'full').identity.principalId]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent')))]",
"[resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-04-01-preview",
"scope": "[format('Microsoft.Search/searchServices/{0}', format('{0}-search', parameters('uniqueNameComponent')))]",
"name": "[guid(resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', '7ca78c08-252a-4471-8644-bb5ff32d4ba0'))]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '7ca78c08-252a-4471-8644-bb5ff32d4ba0')]",
"principalId": "[reference(resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), '2024-04-01-preview', 'full').identity.principalId]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent')))]",
"[resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-04-01-preview",
"scope": "[format('Microsoft.Storage/storageAccounts/{0}', format('{0}storage', parameters('uniqueNameComponent')))]",
"name": "[guid(resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent'))), resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'))]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')]",
"principalId": "[reference(resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), '2024-04-01-preview', 'full').identity.principalId]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent')))]",
"[resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-04-01-preview",
"scope": "[format('Microsoft.CognitiveServices/accounts/{0}', format('{0}-aoai', parameters('uniqueNameComponent')))]",
"name": "[guid(resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', 'a001fd3d-188f-4b5d-821b-7da978bf7442'))]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', 'a001fd3d-188f-4b5d-821b-7da978bf7442')]",
"principalId": "[reference(resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), '2024-03-01-preview', 'full').identity.principalId]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent')))]",
"[resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-04-01-preview",
"scope": "[format('Microsoft.Storage/storageAccounts/{0}', format('{0}storage', parameters('uniqueNameComponent')))]",
"name": "[guid(resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent'))), resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', '2a2b9908-6ea1-4ae2-8e65-a410df84e7d1'))]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '2a2b9908-6ea1-4ae2-8e65-a410df84e7d1')]",
"principalId": "[reference(resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), '2024-03-01-preview', 'full').identity.principalId]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent')))]",
"[resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.ManagedIdentity/userAssignedIdentities",
"apiVersion": "2018-11-30",
"name": "[format('{0}-identity', parameters('uniqueNameComponent'))]",
"location": "[resourceGroup().location]"
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-04-01-preview",
"name": "[guid(resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c'))]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')]",
"principalId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}-identity', parameters('uniqueNameComponent'))), '2018-11-30').principalId]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent')))]",
"[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}-identity', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-04-01-preview",
"scope": "[format('Microsoft.Storage/storageAccounts/{0}', format('{0}storage', parameters('uniqueNameComponent')))]",
"name": "[guid(resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'))]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')]",
"principalId": "[reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}-identity', parameters('uniqueNameComponent'))), '2018-11-30').principalId]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent')))]",
"[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}-identity', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.Resources/deploymentScripts",
"apiVersion": "2020-10-01",
"name": "[format('{0}-script', parameters('uniqueNameComponent'))]",
"location": "[resourceGroup().location]",
"kind": "AzurePowerShell",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"[format('{0}', resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}-identity', parameters('uniqueNameComponent'))))]": {}
}
},
"properties": {
"azPowerShellVersion": "3.0",
"arguments": "[format('-resourceGroupName {0} -uniqueNameComponent {1} -storageAccountId {2} -aoaiKey {3}', resourceGroup().name, parameters('uniqueNameComponent'), resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent'))), listKeys(resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), '2024-04-01-preview').key1)]",
"scriptContent": " param (\n [string]$resourceGroupName,\n [string]$uniqueNameComponent,\n [string]$storageAccountId,\n [string]$aoaiKey\n )\n \n Set-Content -Path data.txt -Value '7月24日 颱風天'\n $storageAccountName = $uniqueNameComponent + 'storage'\n $storageAccount = Get-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName\n Set-AzStorageBlobContent -File 'data.txt' -Container 'data' -Blob 'data.txt' -Context $storageAccount.Context\n\n $uri = \"https://${uniqueNameComponent}-aoai.openai.azure.com/openai/ingestion/jobs/data?api-version=2024-05-01-preview\"\n $headers = @{'api-key' = $aoaiKey}\n $body = @{\n kind = \"SystemCompute\"\n searchServiceConnection = @{\n kind = \"EndpointWithManagedIdentity\"\n endpoint = \"https://${uniqueNameComponent}-search.search.windows.net\"\n }\n datasource = @{\n kind = \"Storage\"\n containerName = \"data\"\n chunkingSettings = @{\n maxChunkSizeInTokens = 1024\n }\n storageAccountConnection = @{\n kind = \"EndpointWithManagedIdentity\"\n endpoint = \"https://${uniqueNameComponent}storage.blob.core.windows.net/\"\n resourceId = \"ResourceId=${storageAccountId}\"\n }\n embeddingsSettings = @(\n @{\n embeddingResourceConnection = @{\n kind = \"RelativeConnection\"\n }\n modelProvider = \"AOAI\"\n deploymentName = \"text-embedding-ada-002\"\n }\n )\n }\n dataRefreshIntervalInHours = 24\n completionAction = \"keepAllAssets\"\n } | ConvertTo-Json -Depth 5\n \n Invoke-RestMethod -Uri $uri -Headers $headers -Method Put -Body $body -ContentType 'application/json'\n ",
"retentionInterval": "PT1H"
},
"dependsOn": [
"[resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent')))]",
"[extensionResourceId(resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), 'Microsoft.Authorization/roleAssignments', guid(resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', 'a001fd3d-188f-4b5d-821b-7da978bf7442')))]",
"[extensionResourceId(resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), 'Microsoft.Authorization/roleAssignments', guid(resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', '1407120a-92aa-4202-b7e9-c0e197c71c8f')))]",
"[extensionResourceId(resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), 'Microsoft.Authorization/roleAssignments', guid(resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', '7ca78c08-252a-4471-8644-bb5ff32d4ba0')))]",
"[resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent')))]",
"[extensionResourceId(resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent'))), 'Microsoft.Authorization/roleAssignments', guid(resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent'))), resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')))]",
"[extensionResourceId(resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent'))), 'Microsoft.Authorization/roleAssignments', guid(resourceId('Microsoft.Storage/storageAccounts', format('{0}storage', parameters('uniqueNameComponent'))), resourceId('Microsoft.Search/searchServices', format('{0}-search', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', '2a2b9908-6ea1-4ae2-8e65-a410df84e7d1')))]",
"[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', format('{0}-identity', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2022-09-01",
"name": "[format('{0}-linuxplan', parameters('uniqueNameComponent'))]",
"location": "[resourceGroup().location]",
"properties": {
"reserved": true
},
"sku": {
"name": "B1"
},
"kind": "linux"
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2020-06-01",
"name": "[format('{0}-assistant-app', parameters('uniqueNameComponent'))]",
"location": "[resourceGroup().location]",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', format('{0}-linuxplan', parameters('uniqueNameComponent')))]",
"httpsOnly": true,
"siteConfig": {
"linuxFxVersion": "PYTHON|3.11",
"alwaysOn": true,
"appCommandLine": "python3 -m gunicorn app:app",
"appSettings": [
{
"name": "AUTH_ENABLED",
"value": "false"
},
{
"name": "AZURE_OPENAI_EMBEDDING_NAME",
"value": "text-embedding-ada-002"
},
{
"name": "AZURE_OPENAI_ENDPOINT",
"value": "[format('https://{0}-aoai.openai.azure.com/', parameters('uniqueNameComponent'))]"
},
{
"name": "AZURE_OPENAI_MAX_TOKENS",
"value": "800"
},
{
"name": "AZURE_OPENAI_MODEL",
"value": "gpt-4o"
},
{
"name": "AZURE_OPENAI_MODEL_NAME",
"value": "gpt-4o"
},
{
"name": "AZURE_OPENAI_RESOURCE",
"value": "[format('{0}-aoai', parameters('uniqueNameComponent'))]"
},
{
"name": "AZURE_OPENAI_SYSTEM_MESSAGE",
"value": "You are an AI assistant that helps people find information."
},
{
"name": "AZURE_OPENAI_TEMPERATURE",
"value": "0"
},
{
"name": "AZURE_OPENAI_TOP_P",
"value": "1"
},
{
"name": "AZURE_SEARCH_ENABLE_IN_DOMAIN",
"value": "true"
},
{
"name": "AZURE_SEARCH_INDEX",
"value": "data"
},
{
"name": "AZURE_SEARCH_QUERY_TYPE",
"value": "vector_simple_hybrid"
},
{
"name": "AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG",
"value": "default"
},
{
"name": "AZURE_SEARCH_SERVICE",
"value": "[format('{0}-search', parameters('uniqueNameComponent'))]"
},
{
"name": "AZURE_SEARCH_STRICTNESS",
"value": "3"
},
{
"name": "AZURE_SEARCH_TOP_K",
"value": "5"
},
{
"name": "AZURE_SEARCH_USE_SEMANTIC_SEARCH",
"value": "true"
},
{
"name": "DATASOURCE_TYPE",
"value": "AzureCognitiveSearch"
},
{
"name": "SCM_DO_BUILD_DURING_DEPLOYMENT",
"value": "true"
}
]
}
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', format('{0}-linuxplan', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.Web/sites/sourcecontrols",
"apiVersion": "2022-09-01",
"name": "[format('{0}/{1}', format('{0}-assistant-app', parameters('uniqueNameComponent')), 'web')]",
"properties": {
"repoUrl": "https://github.com/microsoft/sample-app-aoai-chatGPT.git",
"branch": "main",
"isManualIntegration": true
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', format('{0}-assistant-app', parameters('uniqueNameComponent')))]"
]
},
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2020-04-01-preview",
"scope": "[format('Microsoft.CognitiveServices/accounts/{0}', format('{0}-aoai', parameters('uniqueNameComponent')))]",
"name": "[guid(resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent'))), resourceId('Microsoft.Web/sites', format('{0}-assistant-app', parameters('uniqueNameComponent'))), resourceId('Microsoft.Authorization/roleDefinitions', '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd'))]",
"properties": {
"roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '5e0bd9bd-7b93-4f28-af87-19fc36ad61bd')]",
"principalId": "[reference(resourceId('Microsoft.Web/sites', format('{0}-assistant-app', parameters('uniqueNameComponent'))), '2020-06-01', 'full').identity.principalId]",
"principalType": "ServicePrincipal"
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', format('{0}-assistant-app', parameters('uniqueNameComponent')))]",
"[resourceId('Microsoft.CognitiveServices/accounts', format('{0}-aoai', parameters('uniqueNameComponent')))]"
]
}
]
}