Skip to content

Instantly share code, notes, and snippets.

@markmcgookin
Created March 24, 2019 20:41
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/14fab1e3958998a56046d74f45f8e9d5 to your computer and use it in GitHub Desktop.
Save markmcgookin/14fab1e3958998a56046d74f45f8e9d5 to your computer and use it in GitHub Desktop.
Secure Storage Account Key in Azure Keyvault
{
"type": "Microsoft.KeyVault/vaults/secrets",
"name": "[concat(variables('keyvault_name'), '/', 'StorageAccountKey')]",
"apiVersion": "2016-10-01",
"location": "uksouth",
"scale": null,
"properties": {
"value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2016-01-01').keys[0].value]",
"contentType": "string",
"attributes": {
"enabled": true
}
},
"dependsOn": [
"[resourceId('Microsoft.KeyVault/vaults', variables('keyvault_name'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment