0
0
GCPcloud~30 mins

Eventarc for event routing in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Eventarc for Event Routing
📖 Scenario: You are setting up a simple event routing system in Google Cloud using Eventarc. Your goal is to route events from a Cloud Storage bucket to a Cloud Run service.
🎯 Goal: Build an Eventarc trigger that listens to events from a specific Cloud Storage bucket and routes them to a Cloud Run service.
📋 What You'll Learn
Create a Cloud Storage bucket named my-event-bucket
Create a Cloud Run service named event-receiver
Create an Eventarc trigger named storage-to-run-trigger that routes events from my-event-bucket to event-receiver
💡 Why This Matters
🌍 Real World
Eventarc helps connect event sources like Cloud Storage to serverless services like Cloud Run, enabling reactive and scalable cloud applications.
💼 Career
Understanding Eventarc is important for cloud engineers and developers building event-driven architectures on Google Cloud.
Progress0 / 4 steps
1
Create the Cloud Storage bucket
Create a Cloud Storage bucket named my-event-bucket using the gcloud command.
GCP
Need a hint?

Use gcloud storage buckets create followed by the bucket name.

2
Create the Cloud Run service
Create a Cloud Run service named event-receiver deployed in the us-central1 region. Use the image gcr.io/cloudrun/hello.
GCP
Need a hint?

Use gcloud run deploy with the service name, image, region, and allow unauthenticated access.

3
Create the Eventarc trigger
Create an Eventarc trigger named storage-to-run-trigger that listens to google.cloud.storage.object.v1.finalized events from the bucket my-event-bucket and routes them to the Cloud Run service event-receiver in us-central1.
GCP
Need a hint?

Use gcloud eventarc triggers create with event filters for type and bucket, and specify the destination Cloud Run service and region.

4
Verify the Eventarc trigger
List the Eventarc triggers in us-central1 to verify that the trigger storage-to-run-trigger exists.
GCP
Need a hint?

Use gcloud eventarc triggers list with the --location flag.