@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
118 lines • 4.17 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.HostingSite = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ### Firebasehosting Site Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.firebase.HostingSite("default", {
* project: "my-project-name",
* siteId: "site-no-app",
* });
* ```
* ### Firebasehosting Site Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.firebase.WebApp("default", {
* project: "my-project-name",
* displayName: "Test web app for Firebase Hosting",
* });
* const full = new gcp.firebase.HostingSite("full", {
* project: "my-project-name",
* siteId: "site-with-app",
* appId: _default.appId,
* });
* ```
*
* ## Import
*
* Site can be imported using any of these accepted formats:
*
* * `projects/{{project}}/sites/{{site_id}}`
*
* * `{{project}}/{{site_id}}`
*
* * `sites/{{site_id}}`
*
* * `{{site_id}}`
*
* When using the `pulumi import` command, Site can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:firebase/hostingSite:HostingSite default projects/{{project}}/sites/{{site_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/hostingSite:HostingSite default {{project}}/{{site_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/hostingSite:HostingSite default sites/{{site_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/hostingSite:HostingSite default {{site_id}}
* ```
*/
class HostingSite extends pulumi.CustomResource {
/**
* Get an existing HostingSite 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 HostingSite(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of HostingSite. 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'] === HostingSite.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["appId"] = state ? state.appId : undefined;
resourceInputs["defaultUrl"] = state ? state.defaultUrl : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["siteId"] = state ? state.siteId : undefined;
}
else {
const args = argsOrState;
resourceInputs["appId"] = args ? args.appId : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["siteId"] = args ? args.siteId : undefined;
resourceInputs["defaultUrl"] = undefined /*out*/;
resourceInputs["name"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(HostingSite.__pulumiType, name, resourceInputs, opts);
}
}
exports.HostingSite = HostingSite;
/** @internal */
HostingSite.__pulumiType = 'gcp:firebase/hostingSite:HostingSite';
//# sourceMappingURL=hostingSite.js.map