1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. firebase
  5. Project
Google Cloud v8.25.1 published on Wednesday, Apr 9, 2025 by Pulumi

gcp.firebase.Project

Explore with Pulumi AI

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.

To get more information about Project, see:

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

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const _default = new gcp.organizations.Project("default", {
    projectId: "my-project",
    name: "my-project",
    orgId: "123456789",
    deletionPolicy: "DELETE",
    labels: {
        firebase: "enabled",
    },
});
const defaultProject = new gcp.firebase.Project("default", {project: _default.projectId});
Copy
import pulumi
import pulumi_gcp as gcp

default = gcp.organizations.Project("default",
    project_id="my-project",
    name="my-project",
    org_id="123456789",
    deletion_policy="DELETE",
    labels={
        "firebase": "enabled",
    })
default_project = gcp.firebase.Project("default", project=default.project_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/firebase"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := organizations.NewProject(ctx, "default", &organizations.ProjectArgs{
			ProjectId:      pulumi.String("my-project"),
			Name:           pulumi.String("my-project"),
			OrgId:          pulumi.String("123456789"),
			DeletionPolicy: pulumi.String("DELETE"),
			Labels: pulumi.StringMap{
				"firebase": pulumi.String("enabled"),
			},
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewProject(ctx, "default", &firebase.ProjectArgs{
			Project: _default.ProjectId,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var @default = new Gcp.Organizations.Project("default", new()
    {
        ProjectId = "my-project",
        Name = "my-project",
        OrgId = "123456789",
        DeletionPolicy = "DELETE",
        Labels = 
        {
            { "firebase", "enabled" },
        },
    });

    var defaultProject = new Gcp.Firebase.Project("default", new()
    {
        ProjectID = @default.ProjectId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var default_ = new com.pulumi.gcp.organizations.Project("default", com.pulumi.gcp.organizations.ProjectArgs.builder()
            .projectId("my-project")
            .name("my-project")
            .orgId("123456789")
            .deletionPolicy("DELETE")
            .labels(Map.of("firebase", "enabled"))
            .build());

        var defaultProject = new com.pulumi.gcp.firebase.Project("defaultProject", com.pulumi.gcp.firebase.ProjectArgs.builder()
            .project(default_.projectId())
            .build());

    }
}
Copy
resources:
  default:
    type: gcp:organizations:Project
    properties:
      projectId: my-project
      name: my-project
      orgId: '123456789'
      deletionPolicy: DELETE
      labels:
        firebase: enabled
  defaultProject:
    type: gcp:firebase:Project
    name: default
    properties:
      project: ${default.projectId}
Copy

Create Project Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Project(name: string, args?: ProjectArgs, opts?: CustomResourceOptions);
@overload
def Project(resource_name: str,
            args: Optional[ProjectArgs] = None,
            opts: Optional[ResourceOptions] = None)

@overload
def Project(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            project: Optional[str] = None)
func NewProject(ctx *Context, name string, args *ProjectArgs, opts ...ResourceOption) (*Project, error)
public Project(string name, ProjectArgs? args = null, CustomResourceOptions? opts = null)
public Project(String name, ProjectArgs args)
public Project(String name, ProjectArgs args, CustomResourceOptions options)
type: gcp:firebase:Project
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args ProjectArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args ProjectArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args ProjectArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args ProjectArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ProjectArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var projectResource = new Gcp.Firebase.Project("projectResource", new()
{
    ProjectID = "string",
});
Copy
example, err := firebase.NewProject(ctx, "projectResource", &firebase.ProjectArgs{
	Project: pulumi.String("string"),
})
Copy
var projectResource = new Project("projectResource", ProjectArgs.builder()
    .project("string")
    .build());
Copy
project_resource = gcp.firebase.Project("projectResource", project="string")
Copy
const projectResource = new gcp.firebase.Project("projectResource", {project: "string"});
Copy
type: gcp:firebase:Project
properties:
    project: string
Copy

Project Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Project resource accepts the following input properties:

ProjectID Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Outputs

All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:

DisplayName string
The GCP project display name
Id string
The provider-assigned unique ID for this managed resource.
ProjectNumber string
The number of the Google Project that Firebase is enabled on.
DisplayName string
The GCP project display name
Id string
The provider-assigned unique ID for this managed resource.
ProjectNumber string
The number of the Google Project that Firebase is enabled on.
displayName String
The GCP project display name
id String
The provider-assigned unique ID for this managed resource.
projectNumber String
The number of the Google Project that Firebase is enabled on.
displayName string
The GCP project display name
id string
The provider-assigned unique ID for this managed resource.
projectNumber string
The number of the Google Project that Firebase is enabled on.
display_name str
The GCP project display name
id str
The provider-assigned unique ID for this managed resource.
project_number str
The number of the Google Project that Firebase is enabled on.
displayName String
The GCP project display name
id String
The provider-assigned unique ID for this managed resource.
projectNumber String
The number of the Google Project that Firebase is enabled on.

Look up Existing Project Resource

Get an existing Project resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ProjectState, opts?: CustomResourceOptions): Project
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        display_name: Optional[str] = None,
        project: Optional[str] = None,
        project_number: Optional[str] = None) -> Project
func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
public static Project Get(string name, Input<string> id, ProjectState? state, CustomResourceOptions? opts = null)
public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
resources:  _:    type: gcp:firebase:Project    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DisplayName string
The GCP project display name
ProjectID Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ProjectNumber string
The number of the Google Project that Firebase is enabled on.
DisplayName string
The GCP project display name
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ProjectNumber string
The number of the Google Project that Firebase is enabled on.
displayName String
The GCP project display name
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
projectNumber String
The number of the Google Project that Firebase is enabled on.
displayName string
The GCP project display name
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
projectNumber string
The number of the Google Project that Firebase is enabled on.
display_name str
The GCP project display name
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
project_number str
The number of the Google Project that Firebase is enabled on.
displayName String
The GCP project display name
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
projectNumber String
The number of the Google Project that Firebase is enabled on.

Import

Project can be imported using any of these accepted formats:

  • projects/{{project}}

  • {{project}}

When using the pulumi import command, Project can be imported using one of the formats above. For example:

$ pulumi import gcp:firebase/project:Project default projects/{{project}}
Copy
$ pulumi import gcp:firebase/project:Project default {{project}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.