steep-student-7404
05/15/2025, 10:13 AMv3 (from v2.9), but I get caught by snag on the keys.
There is a constant value keyvault.KeyRotationPolicyActionTypeRotate that has changed in v3 . Previously it was defined as Rotate, but in v3 it has now become rotate. In azure, the lifetimeActions part looks like this:
....
"lifetimeActions": [
{
"action": "Rotate",
"timeAfterCreate": null,
"timeBeforeExpiry": "P30D"
},
{
"action": "Notify",
"timeAfterCreate": null,
"timeBeforeExpiry": "P30D"
}
],
...
Since the constant value changes, it tries to replace the keys - but a rotating key cannot be replaced. It must be deleted and recreated.
How come this change was made, when the Azure value of it has not?
I can solve it by setting the type to keyvault.KeyRotationPolicyType("Rotate"), but it is annoying that this happens.
Annoyingly enough, this does not seem to have any impact.. The keys cannot be updated, and have to be deleted and recreated - it seems.
.... This API can only be used for creating the first version of a new key (no subsequent versions can be created, and existing keys cannot be updated)happy-parrot-60128
05/15/2025, 1:41 PMhappy-parrot-60128
05/15/2025, 1:41 PM"x-ms-enum": {
"name": "KeyRotationPolicyActionType",
"modelAsString": false,
"values": [
{
"value": "Rotate",
"description": "Rotate the key based on the key policy."
},
{
"value": "Notify",
"description": "Trigger Event Grid events. Defaults to 30 days before expiry. Key Vault only."
}
]
}happy-parrot-60128
05/15/2025, 1:43 PM"properties": {
"type": {
"type": "string",
"description": "The type of action.",
"enum": [
"rotate",
"notify"
],
"x-ms-enum": {
"name": "KeyRotationPolicyActionType",
"modelAsString": false
}
}
}happy-parrot-60128
05/15/2025, 1:44 PMhappy-parrot-60128
05/15/2025, 1:47 PMhappy-parrot-60128
05/15/2025, 1:51 PMsteep-student-7404
05/15/2025, 2:00 PM