Configure a custom topic or a domain in Azure Event Grid
This article shows how to update or configure a custom topic or a domain in Azure Event Grid.
Navigate to your topic or domain
Sign in to Azure portal.
In the search bar at the top, type Event Grid Topics, and then select Event Grid Topics from the drop-down list. If you are configuring a domain, search for Event Grid Domains.
On the Event Grid Topics or Event Grid Domains page, select your topic or domain.
Enable to disable local authentication
On the Overview page, in the Essentials section, select the current value for Local Authentication.
On the Local Authentication page, select Enabled or Disabled.
Select OK to close the Local Authentication page.
Configure public or private access
On the left menu, select Networking under Settings.
Select Public networks to allow all networks, including the internet, to access the resource.
You can restrict the traffic using IP firewall rules. Specify a single IPv4 address or a range of IP addresses in Classless inter-domain routing (CIDR) notation.
Select Private endpoints only to allow only private endpoint connections to access this resource. Use the Private endpoint connections tab on this page to manage connections.
For step-by-step instructions to create a private endpoint connection, see Add a private endpoint using Azure portal.
Select Save on the toolbar.
Assign managed identity
When you use Azure portal, you can assign one system assigned identity and up to two user assigned identities to an existing topic or a domain. The following procedures show you how to enable an identity for a custom topic. The steps for enabling an identity for a domain are similar.
To assign a system-assigned identity to a topic
On the left menu, select Identity under Settings.
In the System assigned tab, turn on the switch to enable the identity.
Select Save on the toolbar to save the setting.
To assign a user-assigned identity to a topic
Create a user-assigned identity by following instructions in the Manage user-assigned managed identities article.
On the Identity page, switch to the User assigned tab in the right pane, and then select + Add on the toolbar.
In the Add user managed identity window, follow these steps:
- Select the Azure subscription that has the user-assigned identity.
- Select the user-assigned identity.
- Select Add.
Refresh the list in the User assigned tab to see the added user-assigned identity.
You can use similar steps to enable an identity for an Event Grid domain.
Configure data residency
On the left menu, select Configuration under Settings.
-
- For Data residency, select whether you don't want any data to be replicated to another region (Regional) or you want the metadata to be replicated to a predefined secondary region (Cross-Geo).
The Cross-Geo option allows Microsoft-initiated failover to the paired region in case of a region failure. For more information, see Server-side geo disaster recovery in Azure Event Grid. Microsoft-initiated failover is exercised by Microsoft in rare situations to fail over Event Grid resources from an affected region to the corresponding geo-paired region. This process doesn't require an intervention from user. Microsoft reserves right to make a determination of when this path will be taken. The mechanism doesn't involve a user consent before the user's topic or domain is failed over. For more information, see How do I recover from a failover?.
If you select the Regional option, you may define your own disaster recovery plan.
After updating the setting, select Apply to apply changes.
Next steps
Learn more about what Event Grid can help you do:
- Route custom events to web endpoint with the Azure portal and Event Grid
- About Event Grid
- Event handlers
See the following samples to learn about publishing events to and consuming events from Event Grid using different programming languages.