Google recently released the new Eventarc API trigger for e.g Cloud run. I had the idea to build one trigger for my cloud storage like: new file in bucket → trigger cloud run (with audit log trigger)
cloud_run_path: ...run.app/api/v1/data-fetcher bucket_id: test-bucket
I just created the trigger with the following command and it is successful:
gcloud beta eventarc triggers create test-event-trigger \
--location=europe-west1 \
--destination-run-service=test-event-data-fetcher \
--destination-run-path=/api/v1/data-fetcher \
--destination-run-region=europe-west1 \
--matching-criteria="type=google.cloud.audit.log.v1.written" \
--matching-criteria="serviceName=storage.googleapis.com" \
--matching-criteria="methodName=storage.objects.create" \
--matching-criteria="resourceName=projects/_/buckets/test-bucket" \
--service-account=$PROJECT_NR-compute@developer.gserviceaccount.com
The problem is, I don't want the trigger to look for new files in all buckets in the project, just for one specific bucket (e.g test-bucket). I tested now several options with different writings (with :, =~, ...), but the trigger don't accept these. Maybe you can help me out with the syntax or show me way how its possible to create a Trigger for one specific bucket in my project? Like this it's not working...