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:
- API documentation
- How-to Guides
- Official Documentation
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});
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)
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 {
_, 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
})
}
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,
});
});
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 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 Project("default", ProjectArgs.builder()
.projectId("my-project")
.name("my-project")
.orgId("123456789")
.deletionPolicy("DELETE")
.labels(Map.of("firebase", "enabled"))
.build());
var defaultProject = new Project("defaultProject", ProjectArgs.builder()
.project(default_.projectId())
.build());
}
}
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}
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 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var projectResource = new Gcp.Firebase.Project("projectResource", new()
{
ProjectID = "string",
});
example, err := firebase.NewProject(ctx, "projectResource", &firebase.ProjectArgs{
Project: pulumi.String("string"),
})
var projectResource = new Project("projectResource", ProjectArgs.builder()
.project("string")
.build());
project_resource = gcp.firebase.Project("projectResource", project="string")
const projectResource = new gcp.firebase.Project("projectResource", {project: "string"});
type: gcp:firebase:Project
properties:
project: string
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:
- Project
ID 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:
- Display
Name string - The GCP project display name
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Number string - The number of the google project that firebase is enabled on.
- Display
Name string - The GCP project display name
- Id string
- The provider-assigned unique ID for this managed resource.
- Project
Number string - The number of the google project that firebase is enabled on.
- display
Name String - The GCP project display name
- id String
- The provider-assigned unique ID for this managed resource.
- project
Number String - The number of the google project that firebase is enabled on.
- display
Name string - The GCP project display name
- id string
- The provider-assigned unique ID for this managed resource.
- project
Number 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.
- display
Name String - The GCP project display name
- id String
- The provider-assigned unique ID for this managed resource.
- project
Number 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.
- Display
Name string - The GCP project display name
- Project
ID string - The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Project
Number string - The number of the google project that firebase is enabled on.
- Display
Name 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.
- Project
Number string - The number of the google project that firebase is enabled on.
- display
Name 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.
- project
Number String - The number of the google project that firebase is enabled on.
- display
Name 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.
- project
Number 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.
- display
Name 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.
- project
Number 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}}
$ pulumi import gcp:firebase/project:Project default {{project}}
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.