|
1 | 1 | // Creates Azure dependent resources for Azure AI studio |
| 2 | + |
| 3 | +@minLength(3) |
| 4 | +@maxLength(15) |
| 5 | +@description('Solution Name') |
2 | 6 | param solutionName string |
| 7 | + |
| 8 | +@description('Solution Location') |
3 | 9 | param solutionLocation string |
| 10 | + |
| 11 | +@description('Contains Name of KeyVault.') |
4 | 12 | param keyVaultName string |
| 13 | + |
| 14 | +@description('Indicates the type of Deployment.') |
5 | 15 | param deploymentType string |
| 16 | + |
| 17 | +@description('GPT Model Name') |
6 | 18 | param gptModelName string |
| 19 | + |
| 20 | +@description('GPT Model Version.') |
7 | 21 | param gptModelVersion string |
| 22 | + |
| 23 | +@description('Azure OepnAI API Version.') |
8 | 24 | param azureOpenaiAPIVersion string |
| 25 | + |
| 26 | +@description('Param to get Deployment Capacity.') |
9 | 27 | param gptDeploymentCapacity int |
| 28 | + |
| 29 | +@description('Embedding Model.') |
10 | 30 | param embeddingModel string |
| 31 | + |
| 32 | +@description('Info about Embedding Deployment Capacity.') |
11 | 33 | param embeddingDeploymentCapacity int |
| 34 | + |
| 35 | +@description('Managed Identity Object ID.') |
12 | 36 | param managedIdentityObjectId string |
| 37 | + |
| 38 | +@description('Existing Log Analytics WorkspaceID.') |
13 | 39 | param existingLogAnalyticsWorkspaceId string = '' |
| 40 | + |
| 41 | +@description('Azure Existing AI Project ResourceID.') |
14 | 42 | param azureExistingAIProjectResourceId string = '' |
15 | 43 |
|
16 | | -var abbrs = loadJsonContent('./abbreviations.json') |
| 44 | +//var abbrs = loadJsonContent('./abbreviations.json') |
17 | 45 |
|
18 | | -var aiFoundryName = '${abbrs.ai.aiFoundry}${solutionName}' |
19 | | -var applicationInsightsName = '${abbrs.managementGovernance.applicationInsights}${solutionName}' |
20 | | -var keyvaultName = '${abbrs.security.keyVault}${solutionName}' |
| 46 | +var aiFoundryName = 'aif-${solutionName}' |
| 47 | +var applicationInsightsName = 'appi-${solutionName}' |
| 48 | +var keyvaultName = 'kv-${solutionName}' |
21 | 49 | var location = solutionLocation //'eastus2' |
22 | | -var aiProjectName = '${abbrs.ai.aiFoundryProject}${solutionName}' |
| 50 | +var aiProjectName = 'aifp-${solutionName}' |
23 | 51 | var aiProjectFriendlyName = aiProjectName |
24 | 52 | var aiProjectDescription = 'AI Foundry Project' |
25 | | -var aiSearchName = '${abbrs.ai.aiSearch}${solutionName}' |
26 | | -var workspaceName = '${abbrs.managementGovernance.logAnalyticsWorkspace}${solutionName}' |
| 53 | +var aiSearchName = 'srch-${solutionName}' |
| 54 | +var workspaceName = 'log-${solutionName}' |
27 | 55 | // var aiSearchConnectionName = 'myVectorStoreProjectConnectionName-${solutionName}' |
28 | 56 |
|
29 | 57 | var useExisting = !empty(existingLogAnalyticsWorkspaceId) |
@@ -414,30 +442,57 @@ resource azureLocatioEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-preview |
414 | 442 | } |
415 | 443 | } |
416 | 444 |
|
| 445 | +@description('Contains Name of KeyVault.') |
417 | 446 | output keyvaultName string = keyvaultName |
| 447 | + |
| 448 | +@description('Contains KeyVault ID.') |
418 | 449 | output keyvaultId string = keyVault.id |
419 | 450 |
|
420 | 451 | // output aiServicesTarget string = aiFoundry.properties.endpoint //aiServices_m.properties.endpoint |
421 | 452 | // output aiServicesName string = aiFoundryName //aiServicesName_m |
422 | 453 | // output aiServicesId string = aiFoundry.id //aiServices_m.id |
423 | 454 |
|
| 455 | +@description('Contains AI Search Name.') |
424 | 456 | output aiSearchName string = aiSearchName |
| 457 | + |
| 458 | +@description('Contains AI SearchID.') |
425 | 459 | output aiSearchId string = aiSearch.id |
| 460 | + |
| 461 | +@description('Contains AI Search Target.') |
426 | 462 | output aiSearchTarget string = 'https://${aiSearch.name}.search.windows.net' |
| 463 | + |
| 464 | +@description('Contains AI Search Service.') |
427 | 465 | output aiSearchService string = aiSearch.name |
| 466 | + |
| 467 | +@description('Contains Name of AI Search Connection.') |
428 | 468 | output aiSearchConnectionName string = aiSearchConnectionName |
| 469 | + |
| 470 | +@description('Contains Name of AI Foundry Project.') |
429 | 471 | output aiFoundryProjectName string = !empty(existingAIProjectName) ? existingAIProjectName : aiFoundryProject.name |
430 | 472 | // output aiFoundryProjectEndpoint string = aiFoundryProject.properties.endpoints['AI Foundry API'] |
| 473 | + |
| 474 | +@description('Contains Name of AI Foundry Project Endpoint.') |
431 | 475 | output aiFoundryProjectEndpoint string = !empty(existingProjEndpoint) |
432 | 476 | ? existingProjEndpoint |
433 | 477 | : aiFoundryProject.properties.endpoints['AI Foundry API'] |
434 | 478 | // output aoaiEndpoint string = aiFoundry.properties.endpoints['OpenAI Language Model Instance API'] |
| 479 | + |
| 480 | +@description('Contains AI Endpoint.') |
435 | 481 | output aoaiEndpoint string = !empty(existingOpenAIEndpoint) |
436 | 482 | ? existingOpenAIEndpoint |
437 | 483 | : aiFoundry.properties.endpoints['OpenAI Language Model Instance API'] |
| 484 | + |
| 485 | +@description('Contains Name of AI Foundry.') |
438 | 486 | output aiFoundryName string = !empty(existingAIFoundryName) ? existingAIFoundryName : aiFoundryName |
| 487 | + |
| 488 | +@description('Contains Name of AI Foundry RG.') |
439 | 489 | output aiFoundryRgName string = !empty(existingAIServiceResourceGroup) ? existingAIServiceResourceGroup : resourceGroup().name |
440 | 490 |
|
| 491 | +@description('Contains Application Insights ID.') |
441 | 492 | output applicationInsightsId string = applicationInsights.id |
| 493 | + |
| 494 | +@description('Contains Log Analytics Workspace Resource Name.') |
442 | 495 | output logAnalyticsWorkspaceResourceName string = useExisting ? existingLogAnalyticsWorkspace.name : logAnalytics.name |
| 496 | + |
| 497 | +@description('Contains Application Insights Connection String.') |
443 | 498 | output applicationInsightsConnectionString string = applicationInsights.properties.ConnectionString |
0 commit comments