Skip to content

Commit 71f16a6

Browse files
committed
fix: missing client id for user assigned identity
1 parent 09cbe21 commit 71f16a6

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

infra/core/security/managed-identity.bicep

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ resource apiIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-3
55
name: name
66
location: location
77
}
8+
9+
output tenantId string = apiIdentity.properties.tenantId
10+
output principalId string = apiIdentity.properties.principalId
11+
output clientId string = apiIdentity.properties.clientId

infra/main.bicep

+12-10
Original file line numberDiff line numberDiff line change
@@ -213,16 +213,17 @@ module searchApi './core/host/container-app.bicep' = {
213213
value: storageContainerName
214214
}
215215
{
216-
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
217-
secretRef: 'appinsights-cs'
216+
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
217+
secretRef: 'appinsights-cs'
218+
}
219+
{
220+
name: 'AZURE_CLIENT_ID'
221+
value: searchApiIdentity.outputs.clientId
218222
}
219223
]
220224
imageName: !empty(searchApiImageName) ? searchApiImageName : 'nginx:latest'
221225
targetPort: 3000
222226
}
223-
dependsOn: [
224-
searchApiIdentity
225-
]
226227
}
227228

228229
// Indexer API identity
@@ -292,16 +293,17 @@ module indexerApi './core/host/container-app.bicep' = {
292293
value: storageContainerName
293294
}
294295
{
295-
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
296-
secretRef: 'appinsights-cs'
296+
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
297+
secretRef: 'appinsights-cs'
298+
}
299+
{
300+
name: 'AZURE_CLIENT_ID'
301+
value: indexerApiIdentity.outputs.clientId
297302
}
298303
]
299304
imageName: !empty(indexerApiImageName) ? indexerApiImageName : 'nginx:latest'
300305
targetPort: 3001
301306
}
302-
dependsOn: [
303-
indexerApiIdentity
304-
]
305307
}
306308

307309
module openAi 'core/ai/cognitiveservices.bicep' = {

0 commit comments

Comments
 (0)