55 "_generator" : {
66 "name" : " bicep" ,
77 "version" : " 0.33.93.31351" ,
8- "templateHash" : " 15021662036060306033 "
8+ "templateHash" : " 6443985593110817960 "
99 }
1010 },
1111 "parameters" : {
366366 "_generator" : {
367367 "name" : " bicep" ,
368368 "version" : " 0.33.93.31351" ,
369- "templateHash" : " 6605413385617905631 "
369+ "templateHash" : " 12900062765650369722 "
370370 }
371371 },
372372 "parameters" : {
10191019 "type" : " string" ,
10201020 "value" : " [variables('aiProjectName')]"
10211021 },
1022+ "applicationInsightsId" : {
1023+ "type" : " string" ,
1024+ "value" : " [resourceId('Microsoft.Insights/components', variables('applicationInsightsName'))]"
1025+ },
10221026 "storageAccountName" : {
10231027 "type" : " string" ,
10241028 "value" : " [variables('storageNameCleaned')]"
22952299 "imageTag" : {
22962300 "value" : " [parameters('imageTag')]"
22972301 },
2302+ "applicationInsightsId" : {
2303+ "value" : " [reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_ai_foundry'), '2022-09-01').outputs.applicationInsightsId.value]"
2304+ },
22982305 "solutionName" : {
22992306 "value" : " [variables('solutionPrefix')]"
23002307 },
23562363 "_generator" : {
23572364 "name" : " bicep" ,
23582365 "version" : " 0.33.93.31351" ,
2359- "templateHash" : " 2254598285697484618 "
2366+ "templateHash" : " 5835426116727035307 "
23602367 }
23612368 },
23622369 "parameters" : {
24042411 "description" : " Name of Web App"
24052412 }
24062413 },
2407- "ApplicationInsightsName" : {
2408- "type" : " string" ,
2409- "defaultValue" : " [format('{0}-app-insights', parameters('solutionName'))]" ,
2410- "metadata" : {
2411- "description" : " Name of Application Insights"
2412- }
2413- },
24142414 "AzureOpenAIModel" : {
24152415 "type" : " string" ,
24162416 "metadata" : {
24912491 },
24922492 "imageTag" : {
24932493 "type" : " string"
2494+ },
2495+ "applicationInsightsId" : {
2496+ "type" : " string"
24942497 }
24952498 },
24962499 "variables" : {
25502553 "appSettings" : [
25512554 {
25522555 "name" : " APPINSIGHTS_INSTRUMENTATIONKEY" ,
2553- "value" : " [reference(resourceId('Microsoft.Insights/components', parameters('ApplicationInsightsName') ), '2015-05-01').InstrumentationKey]"
2556+ "value" : " [reference(parameters('applicationInsightsId' ), '2015-05-01').InstrumentationKey]"
25542557 },
25552558 {
25562559 "name" : " AZURE_OPENAI_API_VERSION" ,
26412644 }
26422645 },
26432646 "dependsOn" : [
2644- " [resourceId('Microsoft.Insights/components', parameters('ApplicationInsightsName'))]" ,
26452647 " [resourceId('Microsoft.Web/serverfarms', parameters('HostingPlanName'))]"
26462648 ]
26472649 },
2648- {
2649- "type" : " Microsoft.Insights/components" ,
2650- "apiVersion" : " 2020-02-02" ,
2651- "name" : " [parameters('ApplicationInsightsName')]" ,
2652- "location" : " [resourceGroup().location]" ,
2653- "tags" : {
2654- "[format('hidden-link:{0}', resourceId('Microsoft.Web/sites', parameters('ApplicationInsightsName')))]" : " Resource"
2655- },
2656- "properties" : {
2657- "Application_Type" : " web"
2658- },
2659- "kind" : " web"
2660- },
26612650 {
26622651 "type" : " Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments" ,
26632652 "apiVersion" : " 2022-05-15" ,
26712660 " [resourceId('Microsoft.Web/sites', parameters('WebsiteName'))]"
26722661 ]
26732662 }
2674- ]
2663+ ],
2664+ "outputs" : {
2665+ "webAppUrl" : {
2666+ "type" : " string" ,
2667+ "value" : " [format('https://{0}.azurewebsites.net', parameters('WebsiteName'))]"
2668+ }
2669+ }
26752670 }
26762671 },
26772672 "dependsOn" : [
26812676 " [extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_sql_db')]"
26822677 ]
26832678 }
2684- ]
2679+ ],
2680+ "outputs" : {
2681+ "WEB_APP_URL" : {
2682+ "type" : " string" ,
2683+ "value" : " [reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_app_service'), '2022-09-01').outputs.webAppUrl.value]"
2684+ }
2685+ }
26852686}
0 commit comments