55 "_generator" : {
66 "name" : " bicep" ,
77 "version" : " 0.35.1.17967" ,
8- "templateHash" : " 13571363186442322406 "
8+ "templateHash" : " 11434822242315080162 "
99 }
1010 },
1111 "parameters" : {
5050 "description" : " Capacity of the GPT deployment:"
5151 }
5252 },
53+ "existingLogAnalyticsWorkspaceId" : {
54+ "type" : " string" ,
55+ "defaultValue" : " "
56+ },
5357 "deploymentType" : {
5458 "type" : " string" ,
5559 "defaultValue" : " GlobalStandard" ,
727731 "keyvaultName" : {
728732 "value" : " [format('{0}{1}', variables('abbrs').security.keyVault, variables('ResourcePrefix'))]"
729733 },
730- "solutionName" : {
731- "value" : " [variables('ResourcePrefix')]"
732- },
733734 "solutionLocation" : {
734735 "value" : " [parameters('solutionLocation')]"
735736 },
744745 "_generator" : {
745746 "name" : " bicep" ,
746747 "version" : " 0.35.1.17967" ,
747- "templateHash" : " 14711167186840027914 "
748+ "templateHash" : " 1503106947863889964 "
748749 }
749750 },
750751 "parameters" : {
751- "solutionName" : {
752- "type" : " string" ,
753- "minLength" : 3 ,
754- "maxLength" : 15 ,
755- "metadata" : {
756- "description" : " Solution Name"
757- }
758- },
759752 "solutionLocation" : {
760753 "type" : " string"
761754 },
871864 },
872865 "aiServicesId" : {
873866 "value" : " [resourceId('Microsoft.CognitiveServices/accounts', variables('azureAiServicesName'))]"
867+ },
868+ "existingLogAnalyticsWorkspaceId" : {
869+ "value" : " [parameters('existingLogAnalyticsWorkspaceId')]"
874870 }
875871 },
876872 "template" : {
880876 "_generator" : {
881877 "name" : " bicep" ,
882878 "version" : " 0.35.1.17967" ,
883- "templateHash" : " 6185941478702970428 "
879+ "templateHash" : " 12979035986870693989 "
884880 }
885881 },
886882 "parameters" : {
915911 },
916912 "aiServicesId" : {
917913 "type" : " string"
914+ },
915+ "existingLogAnalyticsWorkspaceId" : {
916+ "type" : " string" ,
917+ "defaultValue" : " "
918918 }
919919 },
920920 "variables" : {
11451145 "virtualDesktopScalingPlan" : " vdscaling-"
11461146 }
11471147 },
1148+ "useExisting" : " [not(empty(parameters('existingLogAnalyticsWorkspaceId')))]" ,
1149+ "existingLawSubscription" : " [if(variables('useExisting'), split(parameters('existingLogAnalyticsWorkspaceId'), '/')[2], '')]" ,
1150+ "existingLawResourceGroup" : " [if(variables('useExisting'), split(parameters('existingLogAnalyticsWorkspaceId'), '/')[4], '')]" ,
1151+ "existingLawName" : " [if(variables('useExisting'), split(parameters('existingLogAnalyticsWorkspaceId'), '/')[8], '')]" ,
11481152 "abbrs" : " [variables('$fxv#0')]" ,
11491153 "storageName" : " [format('{0}{1}', variables('abbrs').storage.storageAccount, parameters('solutionName'))]" ,
11501154 "storageSkuName" : " Standard_LRS" ,
11841188 ]
11851189 },
11861190 {
1191+ "condition" : " [not(variables('useExisting'))]" ,
11871192 "type" : " Microsoft.OperationalInsights/workspaces" ,
11881193 "apiVersion" : " 2023-09-01" ,
11891194 "name" : " [variables('workspaceName')]" ,
14741479 },
14751480 "logAnalyticsId" : {
14761481 "type" : " string" ,
1477- "value" : " [resourceId('Microsoft.OperationalInsights/workspaces', variables('workspaceName'))]"
1482+ "value" : " [if(variables('useExisting'), extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', variables('existingLawSubscription'), variables('existingLawResourceGroup')), 'Microsoft.OperationalInsights/workspaces', variables('existingLawName')), resourceId('Microsoft.OperationalInsights/workspaces', variables('workspaceName') ))]"
14781483 },
14791484 "storageAccountId" : {
14801485 "type" : " string" ,
77257730 " [extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_managed_identity')]"
77267731 ]
77277732 }
7728- ]
7733+ ],
7734+ "outputs" : {
7735+ "AZURE_AIFOUNDRY_NAME" : {
7736+ "type" : " string" ,
7737+ "value" : " [variables('azureAiServicesName')]"
7738+ },
7739+ "WEB_APP_URL" : {
7740+ "type" : " string" ,
7741+ "value" : " [format('https://{0}', reference(resourceId('Microsoft.Resources/deployments', toLower(format('{0}{1}containerAppFrontend', variables('abbrs').containers.containerApp, variables('ResourcePrefix')))), '2022-09-01').outputs.fqdn.value)]"
7742+ }
7743+ }
77297744}
0 commit comments