Skip to content

Commit 54b75de

Browse files
authored
Add basename to bing resource
1 parent 86db9bf commit 54b75de

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
targetScope = 'resourceGroup'
22

3+
@description('This is the base name for each Azure resource name (6-8 chars)')
4+
@minLength(6)
5+
@maxLength(8)
6+
param baseName string
7+
8+
// ---- New resources ----
9+
310
#disable-next-line BCP081
411
resource bingAccount 'Microsoft.Bing/accounts@2025-05-01-preview' = {
5-
name: 'bing-ai-agent'
12+
name: 'bing-ai-agent-${baseName}'
613
location: 'global'
714
kind: 'Bing.Grounding'
815
sku: {
916
name: 'G1'
1017
}
1118
}
1219

20+
// ---- Outputs ----
21+
1322
output bingAccountName string = bingAccount.name

infra-as-code/bicep/main.bicep

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ module deployAIAgentServiceDependencies 'ai-agent-service-dependencies.bicep' =
136136
@description('Deploy the Bing account for Internet grounding data to be used by agents in the Azure AI Agent service.')
137137
module deployBingAccount 'bing-grounding.bicep' = {
138138
scope: resourceGroup()
139+
params: {
140+
baseName: baseName
141+
}
139142
}
140143

141144
@description('Deploy the Azure AI Foundry project into the AI Foundry account. This is the project is the home of the Azure AI Agent service.')

0 commit comments

Comments
 (0)