Wait a minute. Didn’t Eventarc already support receiving Cloud Storage events? You’re absolutely right! Eventarc has long supported Cloud Storage events via the Cloud Audit Logs trigger. However, the new Cloud Storage trigger has a number of advantages and it’s now the preferred way of receiving Cloud Storage events. Let’s take a look at the details.
As a recap, Eventarc has three types of triggers:
- Pub/Sub trigger to receive messages from new or existing Pub/Sub topics.
- Cloud Audit Logs trigger to receive Audit Logs from 100+ event sources.
- Cloud Storage trigger (new) to receive events from Cloud Storage buckets.
Previously, the Audit Logs trigger was the only way to receive Cloud Storage events.
Receiving Cloud Storage events with the Audit Logs trigger
Let’s look at an example that uses the old Audit Logs trigger approach. Here’s an Audit Logs trigger that gets created in the europe-west1 region. It triggers when a new object is created in a Cloud Storage bucket in europe-west1 and the event is routed to a Cloud Run service in us-central1: