Google Firebase Project

This page shows how to write Terraform for Firebase Project and write them securely.

google_firebase_project (Terraform)

The Project in Firebase can be configured in Terraform with the resource name google_firebase_project. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L1
resource "google_firebase_project" "this" {
  provider = google-beta
}
main.tf#L1
resource "google_firebase_project" "default" {
  provider = google-beta
  project  = var.project-id
firebase.tf#L1
resource "google_firebase_project" "default" {
  provider = google-beta
  project  = data.google_project.default.project_id
}

resource "google_firebase_project_location" "basic" {
firebase.tf#L1
resource "google_firebase_project" "default" {
  provider = google-beta
  project  = local.project
firebase.tf#L1
resource "google_firebase_project" "default" {
  provider = google-beta
  project  = local.project

Parameters

The following arguments are supported:


  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

In addition to the arguments listed above, the following computed attributes are exported:

  • id - an identifier for the resource with format projects/[[project]]

  • project_number - The number of the google project that firebase is enabled on.

  • display_name - The GCP project display name

Explanation in Terraform Registry

A Google Cloud Firebase instance. This enables Firebase resources on a given google project. Since a FirebaseProject is actually also a GCP Project, a FirebaseProject uses underlying GCP identifiers (most importantly, the projectId) as its own for easy interop with GCP APIs. Once Firebase has been added to a Google Project it cannot be removed.

Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources. To get more information about Project, see:

Frequently asked questions

What is Google Firebase Project?

Google Firebase Project is a resource for Firebase of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google Firebase Project?

For Terraform, the mcservd/infrastructure-live, muthunaveen555/terraform-firebase and petomalina/cloudevents source code examples are useful. See the Terraform Example section for further details.

security-icon

Scan your IaC problem in 3 minutes for free

You can keep your IaC security for free. No credit card required.