Azure Event Grid Subscription: Storage to ServiceBus Queue

Hi!

I am trying to find a way to create a subscription between Azure Storage Account and Service Bus Queue.

It is possible to do through the UI, but I am struggling to do it through Terraform.

The subscription created through the UI looks like:

{
	"name": "test-subscription",
	"properties": {
		"topic": "/subscriptions/0a00a00e-aa0a-00a0-0000-0000a00a0000/resourceGroups/my-group/providers/Microsoft.Storage/StorageAccounts/mystorage",
		"destination": {
			"endpointType": "ServiceBusQueue",
			"properties": {
				"resourceId": "/subscriptions/0a00a00e-aa0a-00a0-0000-0000a00a0000/resourceGroups/my-group/providers/Microsoft.ServiceBus/namespaces/my-queues/queues/my-inputs"
			}
		},
		"filter": {
			"includedEventTypes": [
				"Microsoft.Storage.BlobCreated"
			],
			"advancedFilters": []
		},
		"labels": [],
		"eventDeliverySchema": "EventGridSchema"
	}
}

Note that it is not a Storage Queue that I am trying to subscribe here, but a ServiceBus Queue.

Is it possible to do it with Terraform? If yes, then how?

Thanks!

1 Like

I am also trying to accomplish the same thing. Please let us know if this is possible. Thank you!