Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created January 4, 2018 11:59
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 justinyoo/d92ae73916b985794bf298695f90ff74 to your computer and use it in GitHub Desktop.
Save justinyoo/d92ae73916b985794bf298695f90ff74 to your computer and use it in GitHub Desktop.
List of Access Keys from Output Values after ARM Template Deployment
{
"variables": {
"storageAccount": {
"name": "my-storage-account"
},
"resourceId": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccount').name)]",
"apiVersion": "[providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]]"
},
"resources": [],
"outputs": {
"storageAccountKey": {
"type": "string",
"value": "[listKeys(variables('resourceId'), variables('apiVersion')).keys[0].value]"
},
"storageAccountEndpoint": {
"type": "string",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccount').name, ';AccountKey=', listKeys(variables('resourceId'), variables('apiVersion')).keys[0].value, ';EndpointSuffix=core.windows.net')]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment