Azure / Azure/azure-rest-api-specs

Bicep Key Vault release_policy not documented / not consistent for exportable keys

Open
#17,657 8 comments 0 reactions 0 assignees View on GitHub
KeyVault Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

I have successfully deployed SSH Key using Bicep.
But I set exportable: true it requires to set release_policy which is not [documented](https://docs.microsoft.com/en-us/azure/templates/microsoft.keyvault/vaults/keys?tabs=bicep#keyreleasepolicy)

The Azure [REST API](https://docs.microsoft.com/en-us/rest/api/keyvault/keys/create-key/create-key#request-body) show other attributes like recoveryLevel but not the exportable attribute
How to configure the release_policy ?

```sh
resource kvKeys 'Microsoft.KeyVault/vaults/keys@2021-06-01-preview' = {
name: aksSshKeyName
parent: kv
properties: {
attributes: {
enabled: true
exp: aksSshKeyExpirationDate // Expiry date in seconds since 1970-01-01T00:00:00Z.
exportable: false // Indicates if the private key can be exported. Exportable keys must have release policy.
// nbf: int
}
keySize: 4096
kty: 'RSA'
rotationPolicy: {
attributes: {
expiryTime: keyExpiryTime
}
lifetimeActions: [
{
action: {
type: 'notify'
}
trigger: {
// timeAfterCreate: 'string'
timeBeforeExpiry: lifetimeActionTriggerBeforeExpiry
}
}
]
}
/*
release_policy: {
contentType: 'x'
data: ''
}
*/
}
}

```

Contributor guide

Open the contributing guide

Research direction

Start with the linked Bicep Key Vault keys documentation and the Azure REST API Create Key request-body documentation for Microsoft.KeyVault/vaults/keys@2021-06-01-preview. Compare the documented exportable and release policy properties with the issue's example, then update the relevant specification or documentation so their support and configuration are consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, cloud, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.