I have created a new Azure Function App with a .NET 5 function implementation, taking advantage of the newly-out-of-preview .NET Isolated support from https://github.com/Azure/azure-functions-dotnet-worker/ . I want this app to handle events from Event Grid.
There are two functions in the application:
- one with an Event Grid trigger
- one with a HTTP trigger
Both triggers work as expected when debugging the application locally.
When deployed, I can successfully use az eventgrid event-subscription create --event-type webhook ...
to subscribe the HTTP trigger function to my Event Grid topic. Everything works as expected. (I added my own implementation of the Event Grid handshake to the HTTP function.)
However, if I try to subscribe the Event Grid trigger function to my Event Grid topic with az eventgrid event-subscription create --event-type azurefunction ...
I instead get an error:
Deployment failed. Correlation ID: 9c0e3d2f-9591-46f0-9581-adf3f00877d9. The operation failed due to an internal server error. The initial state of the impacted resources (if any) are restored. Please try again in few minutes. If error still persists, report 1b81e514-92f6-4b5e-a36c-ab5fbb44a861:3/11/2021 4:25:26 PM (UTC) to our forums for assistance or raise a support ticket .
I notice that if I try to use the Azure Portal web pages to create a subscription, selecting the "Azure Function" endpoint type, no functions are enumerated in my function app ("no available items" is shown). I also notice that in the Function app in Azure Portal, my functions are listed in the table but with the Trigger field blank.
Since the HTTP trigger works I do have a working deployment but it would be good to get the Event Grid trigger working -- can anyone help? Thanks!