czmiel24
czmiel24

Reputation: 75

Create Event Grid Subscription with Event Hub Topic type in ARM

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

Answers (2)

test_
test_

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

Related Questions