Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created January 4, 2018 11:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/3f2590a858e4d09b0b3c4d671d8228a9 to your computer and use it in GitHub Desktop.
Save justinyoo/3f2590a858e4d09b0b3c4d671d8228a9 to your computer and use it in GitHub Desktop.
List of Access Keys from Output Values after ARM Template Deployment
{
"variables": {
"serviceBus": {
"name": "my-service-bus",
"sasKeyName": "RootManageSharedAccessKey"
},
"resourceId1": "[resourceId('Microsoft.ServiceBus/namespaces', variables('serviceBus').name)]",
"resourceId2": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', variables('serviceBus').name, variables('serviceBus').sasKeyName)]",
"apiVersion": "[providers('Microsoft.ServiceBus', 'namespaces').apiVersions[0]]"
},
"resources": [],
"outputs": {
"serviceBusEndpoint": {
"type": "string",
"value": "[reference(variables('resourceId1'), variables('apiVersion')).serviceBusEndpoint]"
},
"serviceBusSasKey": {
"type": "string",
"value": "[listKeys(variables('resourceId2'), variables('apiVersion')).primaryKey]"
},
"serviceBusConnectionString": {
"type": "string",
"value": "[listKeys(variables('resourceId2'), variables('apiVersion')).primaryConnectionString]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment