I have an Event Grid System Topic that sends blob created events to a Service Bus Topic. The messages are processed by a dotnet application sitting in AKS. Now the requirement came for high availability so we decided to turn on Service Bus Geo-disaster recovery. We set the Primary and Secondary namespaces and want to use the Service Bus through the Geo-DR Alias.
Unfortunately I cannot find a way to connect the Event Grid Topic to this Service Bus Geo-DR Alias, it only allows me to select a single service bus namespace.
We are using ARM templates, and I tried different ways, but it is not allowing me to target the alias as a destination resource.
"resources": [{
"type": "Microsoft.EventGrid/systemTopics/eventSubscriptions",
"apiVersion": "2020-10-15-preview",
"name": "[concat(parameters('systemTopicName'), '/', parameters('eventSubscriptionName'))]",
"properties": {
"deliveryWithResourceIdentity": {
"identity": {
"type": "SystemAssigned"
},
"destination": {
"properties": {
"resourceId": "[concat(resourceId(resourceGroup().name, 'Microsoft.ServiceBus/namespaces', parameters('serviceBusNameSpace')), '/topics/blobcreated-event')]"
},
"endpointType": "ServiceBusTopic"
}
},
"filter": {
"subjectBeginsWith": "/blobServices/default/containers/stage",
"includedEventTypes": [
"Microsoft.Storage.BlobCreated"
],
"enableAdvancedFilteringOnArrays": true,
"advancedFilters": [{
"operatorType": "StringIn",
"key": "data.api",
"values": [
"PutBlob",
"PutBlockList",
"FlushWithClose"
]
}]
},
"labels": [],
"eventDeliverySchema": "EventGridSchema",
"retryPolicy": {
"maxDeliveryAttempts": 30,
"eventTimeToLiveInMinutes": 1440
}
}
}]
I have tried to add the alias to the path:
"resourceId": "[concat(resourceId(resourceGroup().name, 'Microsoft.ServiceBus/namespaces', parameters('serviceBusNameSpace')), '/disasterRecoveryConfigs/{aliassname}/topics/blobcreated-event')]"
But that gives me 'Invalid ARM Id.' error.
Other idea was to use Webhook, but EventGrid requires handshake to prove ownership to the Webhook endpoint which I am not sure if Service Bus is capable of.
https://learn.microsoft.com/en-us/azure/event-grid/webhook-event-delivery
Has anybody got this working or found a workaround?