Tanav Gupta
Tanav Gupta

Reputation: 11

Can't deploy cloud function with firestore document creation trigger

My deployment command:

gcloud functions deploy send-verification-mail ^
  --gen2 ^
  --runtime=python312 ^
  --trigger-location=asia-south2 ^
  --region=asia-south2 ^
  --source=. ^
  --entry-point=send_verification_mail ^
  --set-env-vars GOOGLE_CLOUD_PROJECT=myproject ^
  --trigger-event-filters=type=google.cloud.firestore.document.v1.create ^
  --trigger-event-filters-path-pattern=document='users/{username}'

This results in:

ERROR: (gcloud.functions.deploy) ResponseError: status=[400], code=[Ok], message=[Validation failed for trigger projects/myproject/locations/asia-south2/triggers/send-verification-mail-878142: The request was invalid: Operator match-path-pattern is not supported for attribute document within event type google.cloud.firestore.document.v1.create]

Upvotes: 0

Views: 44

Answers (0)

Related Questions