Can't deploy successfully Key Vault virtual machine extension for Windows using VM Template

Pedro Morales 6 Reputation points
2022-10-14T19:23:25.89+00:00

I am using the Key Vault virtual machine extension for Windows Json template to install the extension in my VMs. But I am getting this error:

2022-10-14T14:30:27.2846292Z Status Message: VM has reported a failure when processing extension 'KeyVaultForWindows'. Error message: "Failed to
2022-10-14T14:30:27.2847190Z parse the configuration settings with: 'not an array'"

Portion of my template:

{
"type": "extensions",
"name": "KeyVaultForWindows",
"apiVersion": "2019-07-01",
"location": "[parameters('location')]",
"dependsOn": [
"[if(less(copyindex(), 10), concat(parameters('rdshNamePrefix'), '00', copyIndex()), if(less(copyIndex(), 100), concat(parameters('rdshNamePrefix'), '0', copyIndex()), concat(parameters('rdshNamePrefix'), copyIndex())))]"
],
"properties": {
"publisher": "Microsoft.Azure.KeyVault",
"type": "KeyVaultForWindows",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"settings": {
"secretsManagementSettings": {
"pollingIntervalInS": "3600",
"certificateStoreName": "MY",
"certificateStoreLocation": "LocalMachine",
"observedCertificates": "mycert",
}
}
}
}

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,150 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,290 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Pedro Morales 6 Reputation points
    2022-10-18T17:50:43.787+00:00

    BTW, deploy successfully with exact same json after couple of times...not sure what was happening.

    1 person found this answer helpful.
    0 comments No comments

  2. Cristian SPIRIDON 4,471 Reputation points
    2022-10-16T12:27:22.843+00:00

    Hi,

    From the error looks like there is a syntax error with the json.

    Can you validate the json syntax against an online validator (https://jsonlint.com/ or similar)?

    Hope this helps!