Search code examples
azure-resource-managerazure-keyvaultazure-rm-template

Azure ARM Template - Is it possible to define SSL binding for App Service with .pfx KeyVault Certificate?


I want to use a linked ARM template for adding a SSL binding for an existing App Service.

So far according to official docs: https://learn.microsoft.com/en-us/azure/templates/microsoft.web/certificates

{
  "name": "string",
  "type": "Microsoft.Web/certificates",
  "apiVersion": "2020-06-01",
  "kind": "string",
  "location": "string",
  "tags": {},
  "properties": {
    "hostNames": [
      "string"
    ],
    "pfxBlob": [
      "integer"
    ],
    "password": "string",
    "keyVaultId": "string",
    "keyVaultSecretName": "string",
    "serverFarmId": "string",
    "canonicalName": "string"
  }
}

There are properties for:

  • KeyVaultId
  • KeyVaultSecretName

But nothing about KeyVault Certificates.

Are KeyVault Certificates supported at all in ARM?

P.S. I do know that instead of PFX I could just upload the certificate as a KeyVault object backed by a Secret. However i'm insterested in using PFX directly if possible.


Solution

  • Are KeyVault Certificates supported at all in ARM?

    Currently KeyVault only supports adding new secrets using ARM templates. Your needs are temporarily not supported, so it cannot be resolved at this time.

    You can put forward your needs in azure key vault user voice, so that the development team can better improve the product.