File tree Expand file tree Collapse file tree
use-cases/infrastructure-setup/01-connections Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ resource connection 'Microsoft.CognitiveServices/accounts/connections@2025-04-01
4343 category : 'CognitiveSearch'
4444 target : ((newOrExisting == 'new' ) ? newSearchService .properties .endpoint : existingSearchService .properties .endpoint )
4545 authType : 'ApiKey' // Supported auth types: ApiKey, AAD
46+ isSharedToAll : true
4647 credentials : {
4748 key : ((newOrExisting == 'new' ) ? newSearchService .listAdminKeys ().primaryKey : existingSearchService .listAdminKeys ().primaryKey )
4849 }
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ resource connection 'Microsoft.CognitiveServices/accounts/connections@2025-04-01
4545 category : 'AppInsights'
4646 target : ((newOrExisting == 'new' ) ? newAppInsights .id : existingAppInsights .id )
4747 authType : 'ApiKey'
48+ isSharedToAll : true
4849 credentials : {
4950 key : ((newOrExisting == 'new' ) ? newAppInsights .properties .ConnectionString : existingAppInsights .properties .ConnectionString )
5051 }
Original file line number Diff line number Diff line change 1+ /*
2+ Connections enable your AI applications to access tools and objects managed elsewhere in or outside of Azure.
3+
4+ This example demonstrates how to add an Azure Application Insights connection.
5+
6+ Only one application insights can be set on a project at a time.
7+ */
8+ param aiFoundryName string = '<your-foundry-name>'
9+ param connectedResourceName string = 'st${aiFoundryName }'
10+ param location string = 'global'
11+ param apiKey string = '<your-key>'
12+
13+ // Whether to create a new Azure AI Search resource
14+ @allowed ([
15+ 'new'
16+ 'existing'
17+ ])
18+ param newOrExisting string = 'new'
19+
20+ // Refers your existing Azure AI Foundry resource
21+ resource aiFoundry 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' existing = {
22+ name : aiFoundryName
23+ scope : resourceGroup ()
24+ }
25+
26+ // Conditionally refers your existing Azure AI Search resource
27+ resource existing 'Microsoft.Bing/accounts@2020-06-10' existing = if (newOrExisting == 'existing' ) {
28+ name : connectedResourceName
29+ }
30+
31+ // Conditionally creates a new Azure AI Search resource
32+ resource new 'Microsoft.Bing/accounts@2020-06-10' = if (newOrExisting == 'new' ) {
33+ name : connectedResourceName
34+ location : location
35+ sku : {
36+ name : 'G1'
37+ }
38+ properties : {
39+ statisticsEnabled : false
40+ }
41+ kind : 'Bing.Grounding'
42+ }
43+
44+ // Creates the Azure Foundry connection to your Azure App Insights resource
45+ resource connection 'Microsoft.CognitiveServices/accounts/connections@2025-04-01-preview' = {
46+ name : '${aiFoundryName }-bing'
47+ parent : aiFoundry
48+ properties : {
49+ category : 'ApiKey'
50+ target : 'https://api.bing.microsoft.com/'
51+ authType : 'ApiKey'
52+ isSharedToAll : true
53+ credentials : {
54+ key : apiKey
55+ }
56+ metadata : {
57+ ApiType : 'Azure'
58+ Type : 'bing_grounding'
59+ ResourceId : ((newOrExisting == 'new' ) ? new .id : existing .id )
60+ }
61+ }
62+ }
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ resource connection 'Microsoft.CognitiveServices/accounts/connections@2025-04-01
4545 category : 'AzureStorageAccount'
4646 target : ((newOrExisting == 'new' ) ? newStorage .id : existingStorage .id )
4747 authType : 'AccountKey'
48+ isSharedToAll : true
4849 credentials : {
4950 key : string ((newOrExisting == 'new' ) ? newStorage .listKeys ().keys : existingStorage .listKeys ().keys )
5051 }
You can’t perform that action at this time.
0 commit comments