Skip to content

Commit

Permalink
Merge pull request microsoft#2879 from nabeelmsft/contosomotorswork
Browse files Browse the repository at this point in the history
Addressing issue# 2875, added access policies for the keyvault
  • Loading branch information
dkirby-ms authored Dec 12, 2024
2 parents e96af90 + 225b8cb commit e3e1212
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion azure_jumpstart_ag/contoso_motors/bicep/data/keyVault.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ param resourceTags object = {
Project: 'Jumpstart_azure_aio'
}

@description('Azure service principal object id')
param spnObjectId string

resource akv 'Microsoft.KeyVault/vaults@2023-02-01' = {
name: akvNameSite1
location: location
Expand All @@ -33,7 +36,15 @@ resource akv 'Microsoft.KeyVault/vaults@2023-02-01' = {
name: akvSku
family: 'A'
}
accessPolicies: []
accessPolicies: [
{
tenantId: tenantId
objectId: spnObjectId
permissions: {
secrets: ['get', 'list']
}
}
]
enableSoftDelete: false
tenantId: tenantId
}
Expand Down
1 change: 1 addition & 0 deletions azure_jumpstart_ag/contoso_motors/bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ module keyVault 'data/keyVault.bicep' = {
akvNameSite1: akvNameSite1
akvNameSite2: akvNameSite2
location: location
spnObjectId: spnObjectId
}
}

Expand Down

0 comments on commit e3e1212

Please sign in to comment.