1
votes

Ok really basic - I can't seem to create a subscription to an Azure event grid topic in the Azure Portal. Followed the guides and there is no red ink (to indicate any errors or anything I've missed) in the form but the "Create" button remains steadfastly grey and unreactive to my increasingly desperate presses!

So using "Create Event Subscription" Form on the Azure Portal and...

  1. Subscription name is correctly formatted.
  2. Topic has ben correctly generated (in fact its pre-filled) as I'm choosing the create option from the event topic. Topic is active.
  3. Endpoint is valid - I selected it from drop downs that only show functions which are event grid triggers so doesn't look like I could select any endpoint that wasn't. I created the function specifically to test the trigger.

Obviously missing something very basic but the form is giving no clue as to what it is.

Only thoughts are:

  1. I haven't specified an event type filter but as far as I'm aware it defaults to all which is why the online guide makes no mention of this option.
  2. The function I've created doesn't do anything but I can't see why that would stop it being triggered and thus being a valid endpoint.

I'm at a loss. I've included the json for the attempted subscription shown in the advanced editor if that provides any clues...

{
"name": "testeventsub",
"properties": {
    "topic": "/subscriptions/xxxxxxxxxx/resourceGroups/DBProject/providers/Microsoft.EventGrid/topics/filings",
    "destination": {
        "endpointType": "AzureFunction",
        "properties": {
            "resourceId": "/subscriptions/xxxxxxxxxxx/resourceGroups/DBProject/providers/Microsoft.Web/sites/FilingTestEventTrigger1/functions/NewFilingTrigger1",
            "maxEventsPerBatch": 1,
            "preferredBatchSizeInKilobytes": 64
        }
    },
    "filter": {
        "advancedFilters": []
    },
    "labels": [],
    "eventDeliverySchema": "EventGridSchema"
}

}

1
are the EventHub and Azure Function in same resource-group/subscription? Did you create both yourself (using your login in Portal)? Trying to see if the logged in user has permissions to create subscription. Identity trying to establish this subscription requires contributor access to both resources. Also can you quote the source for "Followed the guides"? What guides?Kashyap
Thanks @Kashyap for your suggestions. I've double checked and they are in the same subscription/resource group. I have full admin rights. Followed the instructions here -docs.microsoft.com/en-us/azure/event-grid/… and here - docs.microsoft.com/en-us/azure/event-grid/…. Same greyed out button on both routes.Jim T
Can you show the screenshot when you create the subcription?1_1
It seems like a bug, may be you can try to create it by command or code.1_1
@BowmanZhu Yep clearly a bug. I added it via CLI Powershell as per json settings shown above with no issues. Sanity restored!Jim T

1 Answers

1
votes

I have do a test, and I face the problem as same as same as you describe:

enter image description here

I also face the Create button greyed out. This problem only comes when you try to create event grid subscription under the event grid topic service.

But you can directly create event grid subscription under the event grid subscription service.

enter image description here

This is the json format on my side:

{
    "name": "0308bowman2",
    "properties": {
        "topic": "/subscriptions/xxxxxx/resourceGroups/testtopic/providers/Microsoft.EventGrid/Topics/testtopic",
        "destination": {
            "endpointType": "AzureFunction",
            "properties": {
                "resourceId": "/subscriptions/xxxxxx/resourceGroups/0730BowmanWindow/providers/Microsoft.Web/sites/0308bowman/functions/EventGridTrigger1",
                "maxEventsPerBatch": 1,
                "preferredBatchSizeInKilobytes": 64
            }
        },
        "filter": {
            "advancedFilters": []
        },
        "labels": [],
        "eventDeliverySchema": "EventGridSchema"
    }
}

This can create success, but I think it is not enough. If we look at the integration mode of event grid subscription and other services, we can find we need to provide event type and subject filters(I didn't do something like event topic&event subcription. But taking integration with other services as examples, I think this is necessary.).

Therefore, for the problem of graying out the Create button, I think this is a front-end bug of azure portal, and this is not your problem.