How to fix "AzureKeyVaultKeyNotFound" during deployment

C0nstanta 5 Reputation points
2024-05-08T20:26:11.08+00:00

I would like to deploy MySQL Database server. But during deployment I got an error like

{
  "code": "AzureKeyVaultKeyNotFound",
  "message": "Could not find Azure Key Vault Key with key name 'Key Identifier'."
}

But I'm sure that key with this identifier exists. Also the key is enabled. Also I have "Key Vault Administrator" and "Owner" roles

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,320 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
857 questions
{count} vote

1 answer

Sort by: Most helpful
  1. hossein jalilian 8,230 Reputation points
    2024-05-08T21:16:14.93+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    1. Ensure that the Azure AD user or service principal deploying the MySQL Database server has the necessary permissions to access the Key Vault and the specified key.
    2. Verify that the "Key Vault Administrator" and "Owner" roles are correctly assigned and have the required permissions. (Consider temporarily granting the "Key Vault Administrator" role to the user or service principal to rule out any permission-related issues.)
    3. Ensure that the Azure Key Vault and the MySQL Database server are located in the same Azure region. mismatched locations can sometimes cause access issues.
    4. Verify that there are no network security group (NSG) rules or firewall configurations blocking access to the Azure Key Vault from the MySQL Database server deployment process.
    5. If the issue persists after verifying the above points, consider redeploying the MySQL Database server from scratch. before redeploying, clear any cached or stale deployment artifacts that might be causing the issue.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments

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.