Firestore Multiple Databases is now generally available

Today, Google are announcing the general availability of Firestore Multiple Databases, which lets you manage multiple Firestore databases within a single Google Cloud project, enhancing data separation, security, resource management, and cost tracking. With this milestone, multiple databases are now fully supported in the Google Cloud console, Terraform resources, and all of Firestore’s SDKs.

Each Firestore database operates with independent isolation, ensuring robust data separation and performance. For example, hotspotting traffic loads on one database will not negatively impact the performance of other databases within the project.

Getting started with creating a Firestore database

Here’s how to create a new Firestore database with a few clicks in the console:

  1. Navigate to the Firestore service.
  2. Click the “CREATE DATABASE” button.
  3. Choose a database id, which serves as the identifier for your database.
  4. Select the desired database configuration settings (Database Mode, Location, Security Rules configuration, etc.).

Note: Database ID and location cannot be changed after creation, so choose carefully!

Want even more control over your Firestore database creation and management? You can use gcloud, Firebase CLI and Terraform to create and manage the Firestore database. For a detailed guide on these options, visit the “Create a database” section in the Firestore documentation.

Configure security on databases

Firestore lets you apply granular security configurations on an individual database through IAM conditions. This functionality allows distinct security policies to be applied to different databases, enabling precise, granular control. For instance, you can grant specific user groups access solely to designated databases, ensuring robust security and data isolation.

To set conditions on a specific database, within the conditions editor tool:

Things you should know when configuring security policy:

View database usage and cost with billing breakdown

Firestore offers granular billing and usage breakdowns, per database. To access this cost data, you can use BigQuery. As an example, the following query demonstrates how to retrieve usage data for October 18, 2023 (UTC), segmented by individual Firestore database IDs.

To establish a seamless workflow for exporting your Cloud Billing data to BigQuery, please consult the Cloud Billing documentation for step-by-step instructions. Additionally, you can use tags to facilitate granular cost breakdown across multiple Firestore databases. For a deeper understanding of the resulting data structure and schema, please refer to the “Structure of Detailed data export” documentation.

Delete a database

If your Firestore database has served its purpose and you no longer need it, you can easily delete it directly from the console with a few clicks.

Things you should know when deleting the database:

Best practices

Related posts

Tips to get the most out of Google Cloud Documentation

by Cloud Ace Indonesia
1 year ago

Supercharging security with generative AI

by Cloud Ace Indonesia
12 months ago

Getting Started with Google Cloud Logging Python v3.0.0

by Cloud Ace Indonesia
2 years ago