@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
259 lines (258 loc) • 10.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* A Release is a particular collection of configurations that is set to be public at a particular time.
*
* To get more information about Release, see:
*
* * [API documentation](https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.releases)
* * How-to Guides
* * [Official Documentation](https://firebase.google.com/docs/hosting)
*
* ## Example Usage
*
* ### Firebasehosting Release In Site
*
* ```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-id",
* });
* const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
* siteId: _default.siteId,
* config: {
* redirects: [{
* glob: "/google/**",
* statusCode: 302,
* location: "https://www.google.com",
* }],
* },
* });
* const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
* siteId: _default.siteId,
* versionName: defaultHostingVersion.name,
* message: "Test release",
* });
* ```
* ### Firebasehosting Release In Channel
*
* ```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-with-channel",
* });
* const defaultHostingVersion = new gcp.firebase.HostingVersion("default", {
* siteId: _default.siteId,
* config: {
* redirects: [{
* glob: "/google/**",
* statusCode: 302,
* location: "https://www.google.com",
* }],
* },
* });
* const defaultHostingChannel = new gcp.firebase.HostingChannel("default", {
* siteId: _default.siteId,
* channelId: "channel-id",
* });
* const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
* siteId: _default.siteId,
* channelId: defaultHostingChannel.channelId,
* versionName: defaultHostingVersion.name,
* message: "Test release in channel",
* });
* ```
* ### Firebasehosting Release Disable
*
* ```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-id",
* });
* const defaultHostingRelease = new gcp.firebase.HostingRelease("default", {
* siteId: _default.siteId,
* type: "SITE_DISABLE",
* message: "Take down site",
* });
* ```
*
* ## Import
*
* Release can be imported using any of these accepted formats:
*
* * `sites/{{site_id}}/channels/{{channel_id}}/releases/{{release_id}}`
*
* * `sites/{{site_id}}/releases/{{release_id}}`
*
* * `{{site_id}}/{{channel_id}}/{{release_id}}`
*
* * `{{site_id}}/{{release_id}}`
*
* When using the `pulumi import` command, Release can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:firebase/hostingRelease:HostingRelease default sites/{{site_id}}/channels/{{channel_id}}/releases/{{release_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/hostingRelease:HostingRelease default sites/{{site_id}}/releases/{{release_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/hostingRelease:HostingRelease default {{site_id}}/{{channel_id}}/{{release_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/hostingRelease:HostingRelease default {{site_id}}/{{release_id}}
* ```
*/
export declare class HostingRelease extends pulumi.CustomResource {
/**
* Get an existing HostingRelease 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: string, id: pulumi.Input<pulumi.ID>, state?: HostingReleaseState, opts?: pulumi.CustomResourceOptions): HostingRelease;
/**
* Returns true if the given object is an instance of HostingRelease. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is HostingRelease;
/**
* The ID of the channel to which the release belongs. If not provided, the release will
* belong to the default "live" channel
*/
readonly channelId: pulumi.Output<string | undefined>;
/**
* The deploy description when the release was created. The value can be up to 512 characters.
*/
readonly message: pulumi.Output<string | undefined>;
/**
* The unique identifier for the release, in either of the following formats:
* sites/SITE_ID/releases/RELEASE_ID
* sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID
*/
readonly name: pulumi.Output<string>;
/**
* The unique identifier for the Release.
*/
readonly releaseId: pulumi.Output<string>;
/**
* Required. The ID of the site to which the release belongs.
*/
readonly siteId: pulumi.Output<string>;
/**
* The type of the release; indicates what happened to the content of the site. There is no need to specify
* `DEPLOY` or `ROLLBACK` type if a `versionName` is provided.
* DEPLOY: A version was uploaded to Firebase Hosting and released. Output only.
* ROLLBACK: The release points back to a previously deployed version. Output only.
* SITE_DISABLE: The release prevents the site from serving content. Firebase Hosting acts as if the site never existed
* Possible values are: `DEPLOY`, `ROLLBACK`, `SITE_DISABLE`.
*/
readonly type: pulumi.Output<string>;
/**
* The unique identifier for a version, in the format: sites/SITE_ID/versions/VERSION_ID.
* The content of the version specified will be actively displayed on the appropriate URL.
* The Version must belong to the same site as in the `siteId`.
* This parameter must be empty if the `type` of the release is `SITE_DISABLE`.
*/
readonly versionName: pulumi.Output<string | undefined>;
/**
* Create a HostingRelease resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: HostingReleaseArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering HostingRelease resources.
*/
export interface HostingReleaseState {
/**
* The ID of the channel to which the release belongs. If not provided, the release will
* belong to the default "live" channel
*/
channelId?: pulumi.Input<string>;
/**
* The deploy description when the release was created. The value can be up to 512 characters.
*/
message?: pulumi.Input<string>;
/**
* The unique identifier for the release, in either of the following formats:
* sites/SITE_ID/releases/RELEASE_ID
* sites/SITE_ID/channels/CHANNEL_ID/releases/RELEASE_ID
*/
name?: pulumi.Input<string>;
/**
* The unique identifier for the Release.
*/
releaseId?: pulumi.Input<string>;
/**
* Required. The ID of the site to which the release belongs.
*/
siteId?: pulumi.Input<string>;
/**
* The type of the release; indicates what happened to the content of the site. There is no need to specify
* `DEPLOY` or `ROLLBACK` type if a `versionName` is provided.
* DEPLOY: A version was uploaded to Firebase Hosting and released. Output only.
* ROLLBACK: The release points back to a previously deployed version. Output only.
* SITE_DISABLE: The release prevents the site from serving content. Firebase Hosting acts as if the site never existed
* Possible values are: `DEPLOY`, `ROLLBACK`, `SITE_DISABLE`.
*/
type?: pulumi.Input<string>;
/**
* The unique identifier for a version, in the format: sites/SITE_ID/versions/VERSION_ID.
* The content of the version specified will be actively displayed on the appropriate URL.
* The Version must belong to the same site as in the `siteId`.
* This parameter must be empty if the `type` of the release is `SITE_DISABLE`.
*/
versionName?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a HostingRelease resource.
*/
export interface HostingReleaseArgs {
/**
* The ID of the channel to which the release belongs. If not provided, the release will
* belong to the default "live" channel
*/
channelId?: pulumi.Input<string>;
/**
* The deploy description when the release was created. The value can be up to 512 characters.
*/
message?: pulumi.Input<string>;
/**
* Required. The ID of the site to which the release belongs.
*/
siteId: pulumi.Input<string>;
/**
* The type of the release; indicates what happened to the content of the site. There is no need to specify
* `DEPLOY` or `ROLLBACK` type if a `versionName` is provided.
* DEPLOY: A version was uploaded to Firebase Hosting and released. Output only.
* ROLLBACK: The release points back to a previously deployed version. Output only.
* SITE_DISABLE: The release prevents the site from serving content. Firebase Hosting acts as if the site never existed
* Possible values are: `DEPLOY`, `ROLLBACK`, `SITE_DISABLE`.
*/
type?: pulumi.Input<string>;
/**
* The unique identifier for a version, in the format: sites/SITE_ID/versions/VERSION_ID.
* The content of the version specified will be actively displayed on the appropriate URL.
* The Version must belong to the same site as in the `siteId`.
* This parameter must be empty if the `type` of the release is `SITE_DISABLE`.
*/
versionName?: pulumi.Input<string>;
}