Complete the code to create an Eventarc trigger that listens to Cloud Storage events.
gcloud eventarc triggers create my-trigger --destination-run-service=my-service --destination-run-region=us-central1 --event-filters=type=[1]The event type google.cloud.storage.object.v1.finalized corresponds to Cloud Storage object creation events, which Eventarc can listen to.
Complete the command to specify the region where the Eventarc trigger will be created.
gcloud eventarc triggers create my-trigger --destination-run-service=my-service --destination-run-region=[1] --event-filters=type=google.cloud.storage.object.v1.finalizedThe region us-central1 is a common and supported region for Eventarc triggers and Cloud Run services.
Fix the error in the Eventarc trigger creation command by selecting the correct flag for the destination service.
gcloud eventarc triggers create my-trigger --destination-run-service=[1] --destination-run-region=us-central1 --event-filters=type=google.cloud.storage.object.v1.finalizedThe correct flag to specify the Cloud Run service is --destination-run-service, not --destination-service. The value should be the service name, here my-service.
Fill both blanks to create an Eventarc trigger that listens to Pub/Sub topic messages and routes them to a Cloud Run service.
gcloud eventarc triggers create pubsub-trigger --destination-run-service=[1] --destination-run-region=[2] --event-filters=type=[3] --event-filters=source=//pubsub.googleapis.com/projects/my-project/topics/my-topic
The trigger routes Pub/Sub messages (google.cloud.pubsub.topic.v1.messagePublished) to the Cloud Run service my-pubsub-service in the us-east1 region.
Fill all three blanks to define an Eventarc trigger in YAML that routes Firestore document changes to a Cloud Run service.
apiVersion: eventarc.googleapis.com/v1
kind: Trigger
metadata:
name: firestore-trigger
spec:
destination:
cloudRunService: [1]
region: [2]
eventFilters:
- attribute: type
value: [3]The YAML defines a trigger named firestore-trigger that listens to Firestore document write events (google.cloud.firestore.document.v1.written) and routes them to the Cloud Run service firestore-service in the us-west1 region.