0
0
Azurecloud~30 mins

Event Grid for event-driven architecture in Azure - Mini Project: Build & Apply

Choose your learning style9 modes available
Event Grid for event-driven architecture
📖 Scenario: You are building a simple event-driven system on Azure. You want to create an Event Grid topic to send events and a subscription to receive those events. This will help your application react to changes in real time, like new files uploaded or messages sent.
🎯 Goal: Create an Azure Event Grid topic and an event subscription using Azure Resource Manager (ARM) template syntax. This will set up the infrastructure to send and receive events.
📋 What You'll Learn
Create an Event Grid topic named myEventGridTopic
Create an Event Grid event subscription named myEventSubscription
Subscribe myEventSubscription to myEventGridTopic
Use valid ARM template JSON structure
💡 Why This Matters
🌍 Real World
Event Grid is used to build reactive, event-driven applications that respond to changes instantly, such as processing uploaded files or triggering workflows.
💼 Career
Understanding Event Grid and ARM templates is essential for cloud engineers and architects working with Azure to automate infrastructure and build scalable event-driven systems.
Progress0 / 4 steps
1
Create the Event Grid topic resource
Create an ARM template resource for an Event Grid topic named myEventGridTopic with type Microsoft.EventGrid/topics and API version 2023-06-01. Set the location to eastus.
Azure
Need a hint?

Use the resources array to define the Event Grid topic resource with the exact name and location.

2
Add the Event Grid event subscription resource
Add an ARM template resource for an Event Grid event subscription named myEventSubscription with type Microsoft.EventGrid/topics/eventSubscriptions and API version 2023-06-01. Set the scope to the Event Grid topic myEventGridTopic and set the destination endpoint URL to https://example.com/api/events.
Azure
Need a hint?

Use the combined name format topicName/subscriptionName for the event subscription resource name.

3
Add a filter to the event subscription
In the event subscription resource, add a filter property to only receive events where the subject begins with /blobServices/default/containers/images/.
Azure
Need a hint?

Add the subjectBeginsWith property inside the filter object.

4
Add tags to the Event Grid topic
Add a tags property to the Event Grid topic resource with the key environment and value production.
Azure
Need a hint?

Add the tags property at the same level as properties in the Event Grid topic resource.