Skip to content

Commit 4f0d86e

Browse files
azd pipeline changes
1 parent ce2bc49 commit 4f0d86e

File tree

3 files changed

+147
-11
lines changed

3 files changed

+147
-11
lines changed

infra/deploy_cosmos_db.bicep

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ resource cosmos 'Microsoft.DocumentDB/databaseAccounts@2022-08-15' = {
4747

4848

4949
resource database 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2022-05-15' = {
50-
name: '${accountName}/${databaseName}'
50+
parent: cosmos
51+
name: databaseName
5152
properties: {
5253
resource: { id: databaseName }
5354
}
@@ -62,10 +63,6 @@ resource database 'Microsoft.DocumentDB/databaseAccounts/sqlDatabases@2022-05-15
6263
options: {}
6364
}
6465
}]
65-
66-
dependsOn: [
67-
cosmos
68-
]
6966
}
7067

7168
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' existing = {

infra/main.bicepparam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ param secondaryLocation = readEnvironmentVariable('AZURE_ENV_SECONDARY_LOCATION'
55
param deploymentType = readEnvironmentVariable('AZURE_ENV_MODEL_DEPLOYMENT_TYPE', 'GlobalStandard')
66
param gptModelName = readEnvironmentVariable('AZURE_ENV_MODEL_NAME', 'gpt-4o')
77
param gptDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_MODEL_CAPACITY', '30'))
8-
// param AzureOpenAIEmbeddingModel = readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_NAME', 'text-embedding-ada-002')
8+
99
param embeddingDeploymentCapacity = int(readEnvironmentVariable('AZURE_ENV_EMBEDDING_MODEL_CAPACITY', '80'))

infra/main.json

Lines changed: 144 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"_generator": {
66
"name": "bicep",
77
"version": "0.33.93.31351",
8-
"templateHash": "7761029633111154178"
8+
"templateHash": "5098669417344941046"
99
}
1010
},
1111
"parameters": {
@@ -1139,6 +1139,17 @@
11391139
"solutionName": {
11401140
"value": "[variables('solutionPrefix')]"
11411141
},
1142+
"aiSearchService": {
1143+
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiSearchService.value]"
1144+
},
1145+
"AzureSearchKey": {
1146+
"reference": {
1147+
"keyVault": {
1148+
"id": "[extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.KeyVault/vaults', reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.keyvaultName.value)]"
1149+
},
1150+
"secretName": "AZURE-SEARCH-KEY"
1151+
}
1152+
},
11421153
"AzureOpenAIEndpoint": {
11431154
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.aiServicesTarget.value]"
11441155
},
@@ -1182,7 +1193,7 @@
11821193
"_generator": {
11831194
"name": "bicep",
11841195
"version": "0.33.93.31351",
1185-
"templateHash": "10772344907596853045"
1196+
"templateHash": "3425162160352923460"
11861197
}
11871198
},
11881199
"parameters": {
@@ -1260,13 +1271,93 @@
12601271
"type": "string",
12611272
"defaultValue": ""
12621273
},
1274+
"aiSearchService": {
1275+
"type": "string"
1276+
},
1277+
"AzureSearchKey": {
1278+
"type": "securestring",
1279+
"defaultValue": "",
1280+
"metadata": {
1281+
"description": "Azure Search Key"
1282+
}
1283+
},
1284+
"AzureSearchUseSemanticSearch": {
1285+
"type": "string",
1286+
"defaultValue": "",
1287+
"metadata": {
1288+
"description": "Enable Semantic Search in Azure Search"
1289+
}
1290+
},
1291+
"AzureSearchEnableInDomain": {
1292+
"type": "string",
1293+
"defaultValue": "",
1294+
"metadata": {
1295+
"description": "Enable In-Domain Search in Azure Search"
1296+
}
1297+
},
1298+
"AzureSearchTopK": {
1299+
"type": "string",
1300+
"defaultValue": "",
1301+
"metadata": {
1302+
"description": "Azure Search Top K"
1303+
}
1304+
},
1305+
"AzureSearchIndexIsPrechunked": {
1306+
"type": "string",
1307+
"defaultValue": "",
1308+
"metadata": {
1309+
"description": "Azure Search Index Is Prechunked"
1310+
}
1311+
},
1312+
"AzureSearchContentColumns": {
1313+
"type": "string",
1314+
"defaultValue": "",
1315+
"metadata": {
1316+
"description": "Azure Search Content Columns"
1317+
}
1318+
},
1319+
"AzureSearchTitleColumn": {
1320+
"type": "string",
1321+
"defaultValue": "",
1322+
"metadata": {
1323+
"description": "Azure Search Title Column"
1324+
}
1325+
},
1326+
"AzureSearchUrlColumn": {
1327+
"type": "string",
1328+
"defaultValue": "",
1329+
"metadata": {
1330+
"description": "Azure Search URL Column"
1331+
}
1332+
},
1333+
"AzureSearchFilenameColumn": {
1334+
"type": "string",
1335+
"defaultValue": "",
1336+
"metadata": {
1337+
"description": "Azure Search Filename Column"
1338+
}
1339+
},
1340+
"AzureSearchSemanticSearchConfig": {
1341+
"type": "string",
1342+
"defaultValue": "",
1343+
"metadata": {
1344+
"description": "Azure Search Semantic Search Config"
1345+
}
1346+
},
12631347
"AZURE_COSMOSDB_ACCOUNT": {
12641348
"type": "string",
12651349
"defaultValue": "",
12661350
"metadata": {
12671351
"description": "Azure Cosmos DB Account"
12681352
}
12691353
},
1354+
"AzureSearchIndex": {
1355+
"type": "string",
1356+
"defaultValue": "",
1357+
"metadata": {
1358+
"description": "Azure Search Index"
1359+
}
1360+
},
12701361
"AZURE_COSMOSDB_CONVERSATIONS_CONTAINER": {
12711362
"type": "string",
12721363
"defaultValue": "",
@@ -1357,6 +1448,54 @@
13571448
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
13581449
"value": "[reference(parameters('applicationInsightsId'), '2015-05-01').InstrumentationKey]"
13591450
},
1451+
{
1452+
"name": "AZURE_SEARCH_SERVICE",
1453+
"value": "[parameters('aiSearchService')]"
1454+
},
1455+
{
1456+
"name": "AZURE_SEARCH_INDEX",
1457+
"value": "[parameters('AzureSearchIndex')]"
1458+
},
1459+
{
1460+
"name": "AZURE_SEARCH_KEY",
1461+
"value": "[parameters('AzureSearchKey')]"
1462+
},
1463+
{
1464+
"name": "AZURE_SEARCH_USE_SEMANTIC_SEARCH",
1465+
"value": "[parameters('AzureSearchUseSemanticSearch')]"
1466+
},
1467+
{
1468+
"name": "AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG",
1469+
"value": "[parameters('AzureSearchSemanticSearchConfig')]"
1470+
},
1471+
{
1472+
"name": "AZURE_SEARCH_INDEX_IS_PRECHUNKED",
1473+
"value": "[parameters('AzureSearchIndexIsPrechunked')]"
1474+
},
1475+
{
1476+
"name": "AZURE_SEARCH_TOP_K",
1477+
"value": "[parameters('AzureSearchTopK')]"
1478+
},
1479+
{
1480+
"name": "AZURE_SEARCH_ENABLE_IN_DOMAIN",
1481+
"value": "[parameters('AzureSearchEnableInDomain')]"
1482+
},
1483+
{
1484+
"name": "AZURE_SEARCH_CONTENT_COLUMNS",
1485+
"value": "[parameters('AzureSearchContentColumns')]"
1486+
},
1487+
{
1488+
"name": "AZURE_SEARCH_FILENAME_COLUMN",
1489+
"value": "[parameters('AzureSearchFilenameColumn')]"
1490+
},
1491+
{
1492+
"name": "AZURE_SEARCH_TITLE_COLUMN",
1493+
"value": "[parameters('AzureSearchTitleColumn')]"
1494+
},
1495+
{
1496+
"name": "AZURE_SEARCH_URL_COLUMN",
1497+
"value": "[parameters('AzureSearchUrlColumn')]"
1498+
},
13601499
{
13611500
"name": "AZURE_OPENAI_API_VERSION",
13621501
"value": "[parameters('azureOpenAIApiVersion')]"
@@ -1496,7 +1635,7 @@
14961635
"_generator": {
14971636
"name": "bicep",
14981637
"version": "0.33.93.31351",
1499-
"templateHash": "3100365088410602500"
1638+
"templateHash": "3309828108890144070"
15001639
}
15011640
},
15021641
"parameters": {
@@ -1548,7 +1687,7 @@
15481687
},
15491688
"type": "Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers",
15501689
"apiVersion": "2022-05-15",
1551-
"name": "[format('{0}/{1}/{2}', split(format('{0}/{1}', variables('accountName'), variables('databaseName')), '/')[0], split(format('{0}/{1}', variables('accountName'), variables('databaseName')), '/')[1], variables('containers')[copyIndex()].name)]",
1690+
"name": "[format('{0}/{1}/{2}', variables('accountName'), variables('databaseName'), variables('containers')[copyIndex()].name)]",
15521691
"properties": {
15531692
"resource": {
15541693
"id": "[variables('containers')[copyIndex()].id]",
@@ -1561,7 +1700,7 @@
15611700
"options": {}
15621701
},
15631702
"dependsOn": [
1564-
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', split(format('{0}/{1}', variables('accountName'), variables('databaseName')), '/')[0], split(format('{0}/{1}', variables('accountName'), variables('databaseName')), '/')[1])]"
1703+
"[resourceId('Microsoft.DocumentDB/databaseAccounts/sqlDatabases', variables('accountName'), variables('databaseName'))]"
15651704
]
15661705
},
15671706
{

0 commit comments

Comments
 (0)