Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markmcgookin/682c814dd027f4f5c65ee4bb3a590efd to your computer and use it in GitHub Desktop.
Save markmcgookin/682c814dd027f4f5c65ee4bb3a590efd to your computer and use it in GitHub Desktop.
Add azure web app identity to Azure Key Vault
{
"type": "Microsoft.KeyVault/vaults",
"name": "[variables('keyvault_name')]",
"apiVersion": "2016-10-01",
"location": "uksouth",
"tags": {},
"scale": null,
"properties": {
"sku": {
"family": "A",
"name": "Premium"
},
"tenantId": "{YOUR_AZURE_AD_TENANT_ID}",
"accessPolicies": [
{
"tenantId": "[reference(concat('Microsoft.Web/sites/', variables('appservice_name')), '2016-08-01', 'Full').identity.tenantId]",
"objectId": "[reference(concat('Microsoft.Web/sites/', variables('appservice_name')), '2016-08-01', 'Full').identity.principalId]",
"permissions": {
"keys": [
"all"
],
"secrets": [
"all"
]
}
}
],
"enabledForDeployment": true,
"enabledForDiskEncryption": true,
"enabledForTemplateDeployment": true
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('appservice_name'))]"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment