ARM template to update nbf and exp parameters of key

2024-08-22T06:04:08.22+00:00

Hi,

I need to update nbf and exp parameters of existing key. Firstly, is it possible to update these params of existing key using ARM ? If yes, can you please provide ARM template for same ?

I tried with ARM template : https://learn.microsoft.com/en-us/azure/key-vault/keys/quick-create-template?tabs=CLI but it gave me error:

"KeyCreationParametersDidNotMatchExistingKey",\r\n "message": "[KeyCreationParametersDidNotMatchExistingKey (BadRequest)] The key 'test' already exists, but the specified key creation parameters did not match that of the existing key (The existing key has an expiration date of '1755752166', which doesn't match the given expiration date '1753228800'.). 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)."\r\n }\r\n}

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,256 questions
0 comments No comments
{count} votes

Accepted answer
  1. Givary-MSFT 32,306 Reputation points Microsoft Employee
    2024-08-22T09:33:23.9166667+00:00

    @Rekhawar, Nilakshi (Corporate, IND) Thank you for reaching out to us, As I understand you are looking use ARM template to update nbf and exp parameters of existing key.

    As per the documentation which you shared - https://learn.microsoft.com/en-us/azure/key-vault/keys/quick-create-template?tabs=CLI in the same doc its clearly mentioned

    It's only possible to create new keys. It isn't possible to update existing keys, nor create new versions of existing keys.

    User's image

    Let me know if you have any further questions, feel free to post back.

    Please remember to "Accept Answer" if answer helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.