arm-artifacts/shared-templates/key-vault-secret.json

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "secretName": {
      "type": "string",
      "metadata": {
        "description": "Enter the secret name."
      }
    },
    "contentType": {
      "type": "string",
      "defaultValue": "text/plain",
      "metadata": {
        "description": "Type of the secret"
      }
    },
    "contentValue": {
      "type": "string",
      "metadata": {
        "description": "Value of the secret"
      }
    },
    "keyVaultName": {
      "type": "string",
      "metadata": {
        "description": "Name of the vault"
      }
    }
  },
  "variables": {
    "defaultApiVersion": "2015-06-15",
    "adlsApiVersion": "2015-10-01-preview",
    "location": "[resourceGroup().location]"
  },
  "resources": [
    {
      "name": "[concat(parameters('keyVaultName'), '/', parameters('secretName'))]",
      "type": "Microsoft.KeyVault/vaults/secrets",
      "apiVersion": "2015-06-01",
      "properties": {
        "contentType": "[parameters('contentType')]",
        "value": "[parameters('contentValue')]"
      }
    }
  ],
  "outputs": {}
}