Hemanth - Thanks for the question and using MS Q&A platform.
You are correct that if you use a storage account as the event topic type, it requires an existing system topic during event subscription creation. This means that you cannot create a custom topic with a storage account as the topic type.
To create an Event Grid topic with a private endpoint as the event source and a storage queue or webhook as the event handler, you can follow these steps:
Create an Event Grid custom topic with a private endpoint. You can do this by following the steps in the Azure documentation for creating an Event Grid custom topic with a private endpoint.
Create an event subscription for the custom topic. In the event subscription configuration, specify the storage queue or webhook as the event handler. You can do this by following the steps in the Azure documentation for creating an event subscription.
Test the event subscription by uploading a file to the blob storage account. This should trigger an event that is sent to the Event Grid topic, which in turn should send the event to the storage queue or webhook specified in the event subscription.
It is not mandatory to use the topic type "storage accounts" while creating an event subscription and a system topic. You can use other topic types such as "custom" or "event hubs" depending on your use case.
If you prefer to use a webhook as the event handler, you can create a webhook endpoint that can receive the events from the Event Grid topic. You can do this by creating an HTTP-triggered Azure Function or a web API that can receive the events and process them. You can then specify the URL of the webhook endpoint in the event subscription configuration.
In terms of best practices, it is recommended to use HTTPS for webhook endpoints to ensure secure transmission of events. You can also use authentication mechanisms such as shared access signatures (SAS) or OAuth to secure the webhook endpoint.
I hope this helps you create an Event Grid topic with a private endpoint and a storage queue or webhook as the event handler. If you have any further questions or concerns, please let me know.