API or CLI for creating a firestore database?

281 views
Skip to first unread message

Cesar Salazar

unread,
Jun 17, 2019, 10:45:38 AM6/17/19
to Firebase Google Group
Hi. I'm working on a new multitenant application and would like to use Firestore. 

I'm planning to create a firebase project per tenant, following the recommendations from https://firebase.google.com/docs/projects/learn-more#multi-tenancy

I found information on how to configure rules and indexes for an existing firestore database, but I haven't found information on how to create a firestore database programmatically.

Is it possible? If not, what's the recommended approach?

Sam Stern

unread,
Jun 17, 2019, 11:35:48 AM6/17/19
to Firebase Google Group
Hi Cesar,

Right now there is no way to create a Firestore database through an API or CLI command, you have to create them manually.  Programmatic configuration is a feature request we've heard before and something we plan to implement eventually, thanks for your vote!

- Sam

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/e17589a2-ec7c-4eb9-8c06-eb12e7f16e87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Xavier DELESTRE

unread,
Feb 7, 2020, 11:07:58 AM2/7/20
to Firebase Google Group
Hey Sam,
Where is the issue tracker to upvote this feature ? 
I'm an "infrastructure as code" fan and having this possibility is a must-have for me and my teammates.
Surprisingly, it's available for real time database...
Cheers.
Xavier.


Le lundi 17 juin 2019 17:35:48 UTC+2, Samuel Stern a écrit :
Hi Cesar,

Right now there is no way to create a Firestore database through an API or CLI command, you have to create them manually.  Programmatic configuration is a feature request we've heard before and something we plan to implement eventually, thanks for your vote!

- Sam

On Mon, Jun 17, 2019 at 7:45 AM Cesar Salazar <csal...@devsu.com> wrote:
Hi. I'm working on a new multitenant application and would like to use Firestore. 

I'm planning to create a firebase project per tenant, following the recommendations from https://firebase.google.com/docs/projects/learn-more#multi-tenancy

I found information on how to configure rules and indexes for an existing firestore database, but I haven't found information on how to create a firestore database programmatically.

Is it possible? If not, what's the recommended approach?

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.

Sam Stern

unread,
Feb 7, 2020, 11:35:51 AM2/7/20
to Firebase Google Group
Thanks for following up!  There is now a gcloud command (in alpha) to do this:

So you can do:
gcloud alpha firestore databases create

- Sam

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/e03375af-69c2-44ef-a352-09142b77d64d%40googlegroups.com.

Andrii Tsok

unread,
Feb 25, 2020, 11:49:45 PM2/25/20
to Firebase Google Group
Hi Sam,

Would it support creating multiple firestores per firebase/GCP project?
To unsubscribe from this group and stop receiving emails from it, send an email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/e03375af-69c2-44ef-a352-09142b77d64d%40googlegroups.com.

Sam Stern

unread,
Feb 26, 2020, 9:16:23 AM2/26/20
to Firebase Google Group
No, there is a hard limit of one Firestore database per project. 

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/91990cfb-e32e-4496-a9ff-d3ca623c7a57%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages