title: Can I get my project ID in GCP Firestore Security Rules?
body: <p>I'm writing Firestore Security Rules and have 2 environments: dev and prod. I want to lock down writes from clients in prod but allow them in dev.</p>
  <p>Our use case: enable faster testing in dev, we allow a document to be written by a client in order to test the UI and some other functionality. In prod, we don't want to allow this since only the backend (which bypasses security rules) should be writing this document.</p>
  <p>I've looked through the <a href="https://firebase.google.com/docs/reference/rules/rules.Boolean" rel="nofollow noreferrer">Firestore Security Rules API Reference</a> but have been unable to find anything useful there.</p>
  <p>My only other option would be to create a root level document (like <code>_env/env</code> with field <code>env</code>) in dev and deny the write operation if it's not found.</p>
  <p>Has anyone found the <code>projectId</code> or other identifier in Firestore Security Rules? I don't really want 2 different security rules... that is a recipe for boarding the Disaster Express.</p>