Project class
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:
- API documentation
- How-to Guides
- Official Documentation
> Note: This resource should usually be used with a provider configuration
with userProjectOverride = 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)
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 main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
"github.com/pulumi/pulumi-gcp/sdk/v9/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
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_organizations_project" "default" {
project_id = "my-project"
name = "my-project"
org_id = "123456789"
deletion_policy = "DELETE"
labels = {
"firebase" = "enabled"
}
}
resource "gcp_firebase_project" "default" {
project = gcp_organizations_project.default.project_id
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import java.util.ArrayList;
import java.util.Arrays;
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());
}
}
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}
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}}
Constructors
- Project(String name, {ProjectArgs? args, CustomResourceOptions? options})
-
Creates a new Project.
nameThe Pulumi resource name.argsArguments used to configure this Project. The set of arguments for Project.optionsResource options controlling this resource's behavior. - Project.reference(String urn)
- Creates a typed reference to an existing Project resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
displayName
↔ Output<
String> -
The GCP project display name
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
project
↔ Output<
String> -
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
latefinal
-
projectNumber
↔ Output<
String> -
The number of the Google Project that Firebase is enabled on.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited