| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** AUTO GENERATED CODE *** Type: MMv1 *** |
| # |
| # ---------------------------------------------------------------------------- |
| # |
| # This file is automatically generated by Magic Modules and manual |
| # changes will be clobbered when the file is regenerated. |
| # |
| # Please read more about how to change this file in |
| # .github/CONTRIBUTING.md. |
| # |
| # ---------------------------------------------------------------------------- |
| subcategory: "Firebase" |
| description: |- |
| A Google Cloud Firebase instance. |
| --- |
| |
| # google_firebase_project |
| |
| 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](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. |
| |
| To get more information about Project, see: |
| |
| * [API documentation](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects) |
| * How-to Guides |
| * [Official Documentation](https://firebase.google.com/docs/projects/terraform/get-started) |
| |
| ~> **Note:** This resource should usually be used with a provider configuration |
| with `user_project_override = true` unless you wish for your quota |
| project to be different from the Firebase project. |
| |
| ## Example Usage - Firebase Project Basic |
| |
| |
| ```hcl |
| resource "google_project" "default" { |
| provider = google-beta |
| |
| project_id = "my-project" |
| name = "my-project" |
| org_id = "123456789" |
| deletion_policy = "DELETE" |
| |
| labels = { |
| "firebase" = "enabled" |
| } |
| } |
| |
| resource "google_firebase_project" "default" { |
| provider = google-beta |
| project = google_project.default.project_id |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| 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. |
| |
| |
| ## Attributes Reference |
| |
| 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 |
| |
| |
| ## Timeouts |
| |
| This resource provides the following |
| [Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| |
| - `create` - Default is 20 minutes. |
| - `delete` - Default is 20 minutes. |
| |
| ## Import |
| |
| |
| Project can be imported using any of these accepted formats: |
| |
| * `projects/{{project}}` |
| * `{{project}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Project using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "projects/{{project}}" |
| to = google_firebase_project.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Project can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_firebase_project.default projects/{{project}} |
| $ terraform import google_firebase_project.default {{project}} |
| ``` |
| |
| ## User Project Overrides |
| |
| This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |