Firestore data trigger events in Cloud Run

Viewed 1506

Are there anyways to get firestore database trigger callbacks when using Cloud Run?

Currently there are options for getting Audio log events but didn't find a way to get firestore update/create/delete triggers when using Cloud Run. However cloud functions has support though.

1 Answers

At the time I write this, there are no hooks for Firestore change events for Cloud Run that are similar to what you see in Cloud Functions. This is something that might change in the future with EventArc. It is in "preview" and not generally available yet. Quoted from that blog:

With Eventarc, you can address key use cases ... by acting on events that originate from Cloud Storage, BigQuery, Firestore and more than 60 other Google Cloud sources.

In the meantime, you could instead write a simple Cloud Function Firestore trigger to receive document change events, and proxy those events to Cloud Run via a pubsub topic or HTTP request.

Related