@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
107 lines • 3.94 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Project = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* 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](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects)
* * 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
*
* ```typescript
* 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
*
* 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:
*
* ```sh
* $ pulumi import gcp:firebase/project:Project default projects/{{project}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/project:Project default {{project}}
* ```
*/
class Project extends pulumi.CustomResource {
/**
* Get an existing Project resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new Project(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Project. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Project.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["project"] = state?.project;
resourceInputs["projectNumber"] = state?.projectNumber;
}
else {
const args = argsOrState;
resourceInputs["project"] = args?.project;
resourceInputs["displayName"] = undefined /*out*/;
resourceInputs["projectNumber"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Project.__pulumiType, name, resourceInputs, opts);
}
}
exports.Project = Project;
/** @internal */
Project.__pulumiType = 'gcp:firebase/project:Project';
//# sourceMappingURL=project.js.map
;