Created
January 3, 2023 04:15
-
-
Save sjwaight/1d0c564c3a1092a4888032923110fdea to your computer and use it in GitHub Desktop.
Sample Azure Bicep snippet showing definition of a Key Vault that uses a Managed Identity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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