Instantly share code, notes, and snippets.

Embed
What would you like to do?
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