title: How to deploy a Firestore trigger on all document writes using gcloud
body: <p>I have a Firestore db that is defined like this: </p>
  
  <pre><code>/my_requests //collection
  /{request-a} //document
  /{request-b} //document
  /{request-c} //document
  </code></pre>
  
  <p>So essentially a single collection called "my_requests" which contains many documents, each representing an individual request.</p>
  
  <p>I am trying to deploy a cloud function using "gcloud functions deploy" for any 'write' event on any "request" that is inserted or modified. I've tried a number of paths trying to find the magic solution but so far nothing has worked. For example the one I feel should work looks like this:</p>
  
  <pre><code>gcloud functions deploy hello_firestore_handler 
  --runtime python37
  --trigger-event providers/cloud.firestore/eventTypes/document.write
  --trigger-resource projects/my-project-id/databases/(default)/documents/my_requests/{request}
  </code></pre>
  
  <p>So how does one create a path that will fire on a "request" document write event?</p>
  
  <p>Thanks</p>