Previously, we were storing our certificates in a key vault secret. But as this function is deprecated we are now storing the certificates in the Key vault -> Certificates.
When deploying an appservice to azure, we make use of this part of the ARM template to get the certificate. This one is still getting the certificate from the secret, instead of from the certificates.
"resources": [
{
"type": "Microsoft.Web/certificates",
"name": "[variables('certName1')]",
"apiVersion": "2019-08-01",
"location": "[variables('location')]",
"properties": {
"keyVaultId": "[resourceId(variables('vaultSubscriptionId'),variables('vaultResourcegroupName'),'Microsoft.KeyVault/vaults', variables('vaultName'))]",
"keyVaultSecretName": "[variables('vaultSecretName1')]"
}
},
{
"type": "Microsoft.Web/certificates",
"name": "[variables('certName2')]",
"dependsOn": [
"[resourceId('Microsoft.Web/certificates', variables('certName1'))]"
],
"apiVersion": "2019-08-01",
"location": "[variables('location')]",
"properties": {
"keyVaultId": "[resourceId(variables('vaultSubscriptionId'),variables('vaultResourcegroupName'),'Microsoft.KeyVault/vaults', variables('vaultName'))]",
"keyVaultSecretName": "[variables('vaultSecretName2')]"
}
},
We are now getting the certificate with the keyVaultSecretName, but we don't want to use the keyvaultsecret anymore to get the certificate, but directly from Certificates. But I can't find how to do this. I am getting errors when removing the property keyVaultSecretName. Or when I leave it there, it can't find the certificate.