ehrencrona
ehrencrona

Reputation: 105

How to enable Cloud Firestore Native Mode using API / command line?

I'm writing a script for setting up a Google Cloud project and I'd like to use Firestore. A new project, however, is by default in Datastore mode.

Switching to Firestore can easily be done using the web interface in the cloud console but I'd like to automate it. Is there any API or command line tool (gcloud? firebase?) for enabling it?

Upvotes: 6

Views: 1883

Answers (2)

Raste
Raste

Reputation: 376

Things seem to have changed by now (03 Jan 2022). I managed to set up a new Firestore with gcloud using the following commands. Native mode is chosen by default:

gcloud app create --region=us-central
gcloud firestore databases create --region=us-central

also see the documentation for app create and firestore database create.

Upvotes: 2

Jim Morrison
Jim Morrison

Reputation: 2887

Unfortunately, as of today (30 Apr 2019), there is no API or command line to set the mode for Cloud Firestore.

Upvotes: 4

Related Questions