Reputation: 75
I would like to deploy the same architecture pattern like this one using ARM templates. I have achieved almost the whole model, but I have a challenge connecting Event Hub with Event Grid. In the 4th point you can see how to create a subscription in Event Grid in a way, that Event Hub sends events to the specific Event Grid's topic.
To do it via Portal you just need to follow the steps. But how to do it automatically? For Example, using ARM templates. I have been able to find a reference how do create a regular topic, but I couldn't find any information how to create an Event Hub Namespace topic in ARM.
Upvotes: 3
Views: 472
Reputation: 416
There is a very good article about how this can be done: Creating Event Grid Subscriptions.
The article contains chapter "Event Hub Namespaces" with an example ARM template code creating Event Hub Namespace Subscription with the endpoint configured to WebHook.
"name": "[concat(parameters('eventHubNamespaceName'), '/Microsoft.EventGrid/', parameters('subscriptionName'))]",
"type": "Microsoft.EventHub/namespaces/providers/eventSubscriptions",
Upvotes: 2
Reputation: 2042
Event Hubs ARM template doc is present here - https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-resource-manager-namespace-event-hub
Event Grid - Event Hubs integration ARM template here - https://github.com/Azure/azure-quickstart-templates/tree/master/101-event-grid-event-hubs-handler
Upvotes: 0