Skip to content

Commit

Permalink
fix: missing client id for user assigned identity
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Mar 21, 2024
1 parent 09cbe21 commit 8ab49a8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
4 changes: 4 additions & 0 deletions infra/core/security/managed-identity.bicep
Expand Up @@ -5,3 +5,7 @@ resource apiIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-3
name: name
location: location
}

output tenantId string = apiIdentity.properties.tenantId
output principalId string = apiIdentity.properties.principalId
output clientId string = apiIdentity.properties.clientId
22 changes: 12 additions & 10 deletions infra/main.bicep
Expand Up @@ -213,16 +213,17 @@ module searchApi './core/host/container-app.bicep' = {
value: storageContainerName
}
{
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
secretRef: 'appinsights-cs'
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
secretRef: 'appinsights-cs'
}
{
name: 'AZURE_CLIENT_ID'
value: searchApiIdentity.outputs.clientId
}
]
imageName: !empty(searchApiImageName) ? searchApiImageName : 'nginx:latest'
targetPort: 3000
}
dependsOn: [
searchApiIdentity
]
}

// Indexer API identity
Expand Down Expand Up @@ -292,16 +293,17 @@ module indexerApi './core/host/container-app.bicep' = {
value: storageContainerName
}
{
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
secretRef: 'appinsights-cs'
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
secretRef: 'appinsights-cs'
}
{
name: 'AZURE_CLIENT_ID'
value: indexerApiIdentity.outputs.clientId
}
]
imageName: !empty(indexerApiImageName) ? indexerApiImageName : 'nginx:latest'
targetPort: 3001
}
dependsOn: [
indexerApiIdentity
]
}

module openAi 'core/ai/cognitiveservices.bicep' = {
Expand Down

0 comments on commit 8ab49a8

Please sign in to comment.