title: azure arm template deploying azure key vault extension to a VM
body: <p>I am attempting to deploy the key vault extension to a VM using an azure Arm template.  Based on this link. <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/key-vault-windows" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/key-vault-windows</a>.</p>
  <p>I get this error when attempting to provision the extension
  Template deployment returned the following errors:
  08:57:27 - 8:57:26 AM - Resource Microsoft.Compute/virtualMachines/extensions 'dcsvm1/test' failed with message '{
  08:57:27 -   &quot;status&quot;: &quot;Failed&quot;,
  08:57:27 -   &quot;error&quot;: {
  08:57:27 -     &quot;code&quot;: &quot;ResourceDeploymentFailure&quot;,
  08:57:27 -     &quot;message&quot;: &quot;The resource operation completed with terminal provisioning state 'Failed'.&quot;,
  08:57:27 -     &quot;details&quot;: [
  08:57:27 -       {
  08:57:27 -         &quot;code&quot;: &quot;VMExtensionProvisioningError&quot;,
  08:57:27 -         &quot;message&quot;: &quot;VM has reported a failure when processing extension 'test'. Error message: &quot;Failed to parse the configuration settings with: 'not an array'&quot;\r\n\r\nMore information on troubleshooting is available at https://aka.ms/vmextensionwindowstroubleshoot &quot;
  08:57:27 -       }
  08:57:27 -     ]</p>
  <pre><code>&gt;     here is the arm template json
  &gt;     type&quot;: &quot;Microsoft.Compute/virtualMachines/extensions&quot;,
  &gt;           &quot;name&quot;: &quot;dcsvm1/test&quot;,
  &gt;           &quot;apiVersion&quot;: &quot;2019-07-01&quot;,
  &gt;           &quot;location&quot;: &quot;[parameters('location')]&quot;,
  &gt;           &quot;dependsOn&quot;: [
  &gt;             &quot;[resourceId('Microsoft.Compute/VirtualMachines', parameters('virtualmachinename'))]&quot;
  &gt;           ],
  &gt;           &quot;properties&quot;: {
  &gt;             &quot;publisher&quot;: &quot;Microsoft.Azure.KeyVault&quot;,
  &gt;             &quot;type&quot;: &quot;KeyVaultForWindows&quot;,
  &gt;             &quot;typeHandlerVersion&quot;: &quot;1.0&quot;,
  &gt;             &quot;settings&quot;: {
  &gt;               &quot;secretsManagementSettings&quot;: {
  &gt;                 &quot;pollingIntervalIns&quot;: &quot;3600&quot;,
  &gt;                 &quot;certificateStoreName&quot;: &quot;MY&quot;,
  &gt;                 &quot;linkOnRenewal&quot;: &quot;false&quot;,
  &gt;                 &quot;certificateStoreLocation&quot;: &quot;LocalMachine&quot;,
  &gt;                 //&quot;requireInitialSync&quot;: &quot;true&quot;,
  &gt;                 //&quot;observedCertificates&quot;: &quot;https://testkvdsc.vault.azure.net:443/certificates/wildcard/9817edfba5124579b75649f51902ef99&quot;,
  &gt;                 &quot;observedCertificates&quot;: &quot;https://testkvdsc.vault.azure.net:443/secrets/wildcard&quot;
  &gt;               }         
  &gt;             }
  &gt;           }
  &gt;         },
  </code></pre>
  <p>I have been able get add the extension after the VM is created using powershell but much rather have it installed via the arm template.</p>