Created
May 27, 2016 23:07
-
-
Save jtaubensee/343d3e9b93788ddb41b444033e878684 to your computer and use it in GitHub Desktop.
Same ARM template that is at https://azure.microsoft.com/en-us/documentation/articles/service-bus-resource-manager-namespace-event-hub/#comment-2695399156, but includes an auth rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"serviceBusNamespaceName": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of the EventHub namespace" | |
} | |
}, | |
"serviceBusEventHubName": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of the Event Hub" | |
} | |
}, | |
"serviceBusConsumerGroupName": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of the Consumer Group" | |
} | |
}, | |
"serviceBusApiVersion": { | |
"type": "string", | |
"defaultValue": "2015-08-01", | |
"metadata": { | |
"description": "Service Bus ApiVersion used by the template" | |
} | |
}, | |
"eventHubAuthRule": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of the SAS Rule" | |
} | |
} | |
}, | |
"variables": { | |
"location": "[resourceGroup().location]", | |
"ehVersion": "[parameters('serviceBusApiVersion')]", | |
"defaultSASKeyName": "RootManageSharedAccessKey", | |
"authRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/authorizationRules', parameters('serviceBusNamespaceName'), variables('defaultSASKeyName'))]" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "[variables('ehVersion')]", | |
"name": "[parameters('serviceBusNamespaceName')]", | |
"type": "Microsoft.ServiceBus/Namespaces", | |
"location": "[variables('location')]", | |
"kind": "EventHub", | |
"sku": { | |
"name": "StandardSku", | |
"tier": "Standard" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "[variables('ehVersion')]", | |
"name": "[parameters('serviceBusEventHubName')]", | |
"type": "EventHubs", | |
"dependsOn": [ | |
"[concat('Microsoft.ServiceBus/namespaces/', parameters('serviceBusNamespaceName'))]" | |
], | |
"properties": { | |
"path": "[parameters('serviceBusEventHubName')]" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "[variables('ehVersion')]", | |
"name": "[parameters('serviceBusConsumerGroupName')]", | |
"type": "ConsumerGroups", | |
"dependsOn": [ | |
"[parameters('serviceBusEventHubName')]" | |
], | |
"properties": {} | |
}, | |
{ | |
"apiVersion": "[variables('ehVersion')]", | |
"name": "[parameters('eventHubAuthRule')]", | |
"type": "authorizationRules", | |
"dependsOn": [ | |
"[parameters('serviceBusEventHubName')]" | |
], | |
"properties": { | |
"Rights": ["Send"] | |
} | |
} | |
] | |
} | |
] | |
} | |
], | |
"outputs": { | |
"NamespaceConnectionString": { | |
"type": "string", | |
"value": "[listkeys(variables('authRuleResourceId'), variables('ehVersion')).primaryConnectionString]" | |
}, | |
"SharedAccessPolicyPrimaryKey": { | |
"type": "string", | |
"value": "[listkeys(variables('authRuleResourceId'), variables('ehVersion')).primaryKey]" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the authRule part: