Terraform for Firestore creation

Viewed 4095

is it possible to automate GCP Firestore creation using Terraform or another tool? I cannot find anything about it in docs. Regards

2 Answers

Update 7/23/20: see automating database creation.

You can enable Firestore using the google_project_service resource:

resource "google_project_service" "firestore" {
  project = var.project_id
  service = "firestore.googleapis.com"

  disable_dependent_services = true
}

Edit: I don't see any possibility to create the database itself, however, you can use the google_firebase_project_location to set the location of the Firestore (this will also set the GAE location and the location of the default bucket).

Related