简体   繁体   中英

Terraform for google firebase vs. firestore

For setting up Firebase in a Google Cloud Project, the Google terraform provider provides two resources:
google_firebase_project
google_firebase_project_location

My understanding is that Firestore is a component of Firebase, so setting the location of the Firebase project also sets the location of the Firestore database.

However, the google Firestore documentation here says to use google_app_engine_application to configure the Firestore location (and type).

Is it possible to configure Firestore without Firebase?
Is it possible to configure Firebase without Firestore?
Is it possible to configure different locations for Firestore and Firebase in the same GCP?
If I create Firestore using:

resource "google_app_engine_application" "app" {
  project     = google_project.my_project.project_id
  location_id = "location"
  database_type = "CLOUD_FIRESTORE"
}

do I still need to create the google_firebase_project and/or google_firebase_project_location resources? Can I create them? Should I create them? Can I get away with NOT creating them?

At the end of the day, what I want is a Google Cloud Project with Firestore in Native mode and a particular location. I tried using google_firebase_project_location , but this created Firestore in the desired location but NOT in Native mode. I now have to create another GCP project and would like to ensure the Firestore is in Native mode.

I think you would be helped by reading this documentation .

Is it possible to configure Firestore without Firebase?

Yes. Firestore is a Google Cloud product , and Firebase adds APIs and functionality to it relevant for web and mobile apps. Read this . It works just fine without anything related to Firebase.

Is it possible to configure Firebase without Firestore?

Yes. You are free to use Firebase without touching Firestore at all.

Is it possible to configure different locations for Firestore and Firebase in the same GCP?

No. Refer to the documentation I linked at the top. Firestore always uses your default project location, which you are forced to select before you use a cloud product that requires a location. Not all products require a location, but once you choose one for a project, it's locked in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM