An AI application runs on several instances and connects to Azure Cosmos DB with the account's primary key. The key is stored in Azure Key Vault as the secret cosmosdb-key, and each instance refetches the secret from Key Vault periodically. You must rotate the key. Requirements:
- No application instance can experience an authentication failure during the rotation.
- The previous key value must remain retrievable from Key Vault as an earlier version of the same secret.
Which rotation sequence should you use?
Choose one answer.
- Generate a new secondary key, delete the secret and recreate it with the new key, wait for all instances to pick it up, and then regenerate the old primary key.
- Generate a new secondary key, store it as a new secret version, wait for all instances to pick up the new value, and then regenerate the old primary key.
- Regenerate the old primary key, store it as a new secret version, wait for all instances to pick up the new value, and then generate a new secondary key.
- Generate a new secondary key, store it as a new secret version, regenerate the old primary key, and then wait for all instances to pick up the new value.