Skip to content

Instantly share code, notes, and snippets.

@sjwaight
Created January 3, 2023 04:15
Embed
What would you like to do?
Sample Azure Bicep snippet showing definition of a Key Vault that uses a Managed Identity
resource key_vault_resource 'Microsoft.KeyVault/vaults@2022-07-01' = {
name: key_vault_name
location: resource_group_location
properties: {
sku: {
family: 'A'
name: 'standard'
}
tenantId: subscription().tenantId
accessPolicies: [
{
tenantId: subscription().tenantId
objectId: managed_service_identity_kv_resource.properties.principalId
permissions: {
certificates: []
keys: []
secrets: [
'get'
]
}
}
]
enabledForDeployment: false
enabledForDiskEncryption: false
enabledForTemplateDeployment: false
enableSoftDelete: true
softDeleteRetentionInDays: 7
enableRbacAuthorization: false
publicNetworkAccess: 'Enabled'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment