gcp logo
Google Cloud Classic v6.52.0, Mar 22 23

gcp.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.

To get more information about Project, see:

Example Usage

Firebase Project Basic

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var defaultProject = new Gcp.Organizations.Project("defaultProject", new()
    {
        ProjectId = "tf-test",
        OrgId = "123456789",
        Labels = 
        {
            { "firebase", "enabled" },
        },
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

    var defaultFirebase_projectProject = new Gcp.Firebase.Project("defaultFirebase/projectProject", new()
    {
        ProjectID = defaultProject.ProjectId,
    }, new CustomResourceOptions
    {
        Provider = google_beta,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultProject, err := organizations.NewProject(ctx, "defaultProject", &organizations.ProjectArgs{
			ProjectId: pulumi.String("tf-test"),
			OrgId:     pulumi.String("123456789"),
			Labels: pulumi.StringMap{
				"firebase": pulumi.String("enabled"),
			},
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = firebase.NewProject(ctx, "defaultFirebase/projectProject", &firebase.ProjectArgs{
			Project: defaultProject.ProjectId,
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.Project;
import com.pulumi.gcp.organizations.ProjectArgs;
import com.pulumi.gcp.firebase.Project;
import com.pulumi.gcp.firebase.ProjectArgs;
import com.pulumi.resources.CustomResourceOptions;
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 defaultProject = new Project("defaultProject", ProjectArgs.builder()        
            .projectId("tf-test")
            .orgId("123456789")
            .labels(Map.of("firebase", "enabled"))
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

        var defaultFirebase_projectProject = new Project("defaultFirebase/projectProject", ProjectArgs.builder()        
            .project(defaultProject.projectId())
            .build(), CustomResourceOptions.builder()
                .provider(google_beta)
                .build());

    }
}
import pulumi
import pulumi_gcp as gcp

default_project = gcp.organizations.Project("defaultProject",
    project_id="tf-test",
    org_id="123456789",
    labels={
        "firebase": "enabled",
    },
    opts=pulumi.ResourceOptions(provider=google_beta))
default_firebase_project_project = gcp.firebase.Project("defaultFirebase/projectProject", project=default_project.project_id,
opts=pulumi.ResourceOptions(provider=google_beta))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultProject = new gcp.organizations.Project("defaultProject", {
    projectId: "tf-test",
    orgId: "123456789",
    labels: {
        firebase: "enabled",
    },
}, {
    provider: google_beta,
});
const defaultFirebase_projectProject = new gcp.firebase.Project("defaultFirebase/projectProject", {project: defaultProject.projectId}, {
    provider: google_beta,
});
resources:
  defaultProject:
    type: gcp:organizations:Project
    properties:
      projectId: tf-test
      orgId: '123456789'
      labels:
        firebase: enabled
    options:
      provider: ${["google-beta"]}
  defaultFirebase/projectProject:
    type: gcp:firebase:Project
    properties:
      project: ${defaultProject.projectId}
    options:
      provider: ${["google-beta"]}

Create Project Resource

new Project(name: string, args?: ProjectArgs, opts?: CustomResourceOptions);
@overload
def Project(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            project: Optional[str] = None)
@overload
def Project(resource_name: str,
            args: Optional[ProjectArgs] = None,
            opts: Optional[ResourceOptions] = 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.

name 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 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 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 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 String
The unique name of the resource.
args ProjectArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The Project resource accepts the following input properties:

ProjectID string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

project 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)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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 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 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 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 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 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 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

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

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.