Skip to content

Commit 51c2d70

Browse files
committed
Testing ai key error fix
1 parent 243a6cf commit 51c2d70

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

infra/deploy_ai_foundry.bicep

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ param gptModelName string
66
param gptModelVersion string
77
param managedIdentityObjectId string
88
param aiServicesEndpoint string
9-
param aiServicesKey string
9+
param aiServices object
1010
param aiServicesId string
1111

1212
var storageName = '${solutionName}hubstorage'
@@ -136,7 +136,7 @@ resource aiHub 'Microsoft.MachineLearningServices/workspaces@2023-08-01-preview'
136136
authType: 'ApiKey'
137137
isSharedToAll: true
138138
credentials: {
139-
key: aiServicesKey
139+
key: aiServices.Key.key1
140140
}
141141
metadata: {
142142
ApiType: 'Azure'
@@ -187,7 +187,7 @@ resource azureOpenAIApiKeyEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-pr
187187
parent: keyVault
188188
name: 'AZURE-OPENAI-KEY'
189189
properties: {
190-
value: aiServicesKey //aiServices_m.listKeys().key1
190+
value: aiServices.Key.key1 //aiServices_m.listKeys().key1
191191
}
192192
}
193193

@@ -251,7 +251,7 @@ resource cogServiceKeyEntry 'Microsoft.KeyVault/vaults/secrets@2021-11-01-previe
251251
parent: keyVault
252252
name: 'COG-SERVICES-KEY'
253253
properties: {
254-
value: aiServicesKey
254+
value: aiServices.Key.key1
255255
}
256256
}
257257

infra/main.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ module aifoundry 'deploy_ai_foundry.bicep' = {
168168
gptModelVersion: gptModelVersion
169169
managedIdentityObjectId: managedIdentityModule.outputs.managedIdentityOutput.objectId
170170
aiServicesEndpoint: aiServices.properties.endpoint
171-
aiServicesKey: aiServices.listKeys().key1
171+
aiServices: aiServices
172172
aiServicesId: aiServices.id
173173
}
174174
scope: resourceGroup(resourceGroup().name)

0 commit comments

Comments
 (0)