HostingRelease class

A Release is a particular collection of configurations that is set to be public at a particular time.

> 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 Release, see:

Example Usage

Firebasehosting Release In Site

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",
});
import pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-id")
default_hosting_version = gcp.firebase.HostingVersion("default",
    site_id=default.site_id,
    config={
        "redirects": [{
            "glob": "/google/**",
            "status_code": 302,
            "location": "https://www.google.com",
        }],
    })
default_hosting_release = gcp.firebase.HostingRelease("default",
    site_id=default.site_id,
    version_name=default_hosting_version.name,
    message="Test release")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var @default = new Gcp.Firebase.HostingSite("default", new()
    {
        Project = "my-project-name",
        SiteId = "site-id",
    });

    var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
    {
        SiteId = @default.SiteId,
        Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
        {
            Redirects = new[]
            {
                new Gcp.Firebase.Inputs.HostingVersionConfigRedirectArgs
                {
                    Glob = "/google/**",
                    StatusCode = 302,
                    Location = "https://www.google.com",
                },
            },
        },
    });

    var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
    {
        SiteId = @default.SiteId,
        VersionName = defaultHostingVersion.Name,
        Message = "Test release",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-id"),
		})
		if err != nil {
			return err
		}
		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
			SiteId: _default.SiteId,
			Config: &firebase.HostingVersionConfigArgs{
				Redirects: firebase.HostingVersionConfigRedirectArray{
					&firebase.HostingVersionConfigRedirectArgs{
						Glob:       pulumi.String("/google/**"),
						StatusCode: pulumi.Int(302),
						Location:   pulumi.String("https://www.google.com"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
			SiteId:      _default.SiteId,
			VersionName: defaultHostingVersion.Name,
			Message:     pulumi.String("Test release"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_firebase_hostingsite" "default" {
  project = "my-project-name"
  site_id = "site-id"
}
resource "gcp_firebase_hostingversion" "default" {
  site_id = gcp_firebase_hostingsite.default.site_id
  config = {
    redirects = [{
      "glob"       = "/google/**"
      "statusCode" = 302
      "location"   = "https://www.google.com"
    }]
  }
}
resource "gcp_firebase_hostingrelease" "default" {
  site_id      = gcp_firebase_hostingsite.default.site_id
  version_name = gcp_firebase_hostingversion.default.name
  message      = "Test release"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.HostingSite;
import com.pulumi.gcp.firebase.HostingSiteArgs;
import com.pulumi.gcp.firebase.HostingVersion;
import com.pulumi.gcp.firebase.HostingVersionArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigRedirectArgs;
import com.pulumi.gcp.firebase.HostingRelease;
import com.pulumi.gcp.firebase.HostingReleaseArgs;
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 HostingSite("default", HostingSiteArgs.builder()
            .project("my-project-name")
            .siteId("site-id")
            .build());

        var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
            .siteId(default_.siteId())
            .config(HostingVersionConfigArgs.builder()
                .redirects(HostingVersionConfigRedirectArgs.builder()
                    .glob("/google/**")
                    .statusCode(302)
                    .location("https://www.google.com")
                    .build())
                .build())
            .build());

        var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
            .siteId(default_.siteId())
            .versionName(defaultHostingVersion.name())
            .message("Test release")
            .build());

    }
}
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-id
  defaultHostingVersion:
    type: gcp:firebase:HostingVersion
    name: default
    properties:
      siteId: ${default.siteId}
      config:
        redirects:
          - glob: /google/**
            statusCode: 302
            location: https://www.google.com
  defaultHostingRelease:
    type: gcp:firebase:HostingRelease
    name: default
    properties:
      siteId: ${default.siteId}
      versionName: ${defaultHostingVersion.name}
      message: Test release

Firebasehosting Release In Channel

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",
});
import pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-with-channel")
default_hosting_version = gcp.firebase.HostingVersion("default",
    site_id=default.site_id,
    config={
        "redirects": [{
            "glob": "/google/**",
            "status_code": 302,
            "location": "https://www.google.com",
        }],
    })
default_hosting_channel = gcp.firebase.HostingChannel("default",
    site_id=default.site_id,
    channel_id="channel-id")
default_hosting_release = gcp.firebase.HostingRelease("default",
    site_id=default.site_id,
    channel_id=default_hosting_channel.channel_id,
    version_name=default_hosting_version.name,
    message="Test release in channel")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var @default = new Gcp.Firebase.HostingSite("default", new()
    {
        Project = "my-project-name",
        SiteId = "site-with-channel",
    });

    var defaultHostingVersion = new Gcp.Firebase.HostingVersion("default", new()
    {
        SiteId = @default.SiteId,
        Config = new Gcp.Firebase.Inputs.HostingVersionConfigArgs
        {
            Redirects = new[]
            {
                new Gcp.Firebase.Inputs.HostingVersionConfigRedirectArgs
                {
                    Glob = "/google/**",
                    StatusCode = 302,
                    Location = "https://www.google.com",
                },
            },
        },
    });

    var defaultHostingChannel = new Gcp.Firebase.HostingChannel("default", new()
    {
        SiteId = @default.SiteId,
        ChannelId = "channel-id",
    });

    var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
    {
        SiteId = @default.SiteId,
        ChannelId = defaultHostingChannel.ChannelId,
        VersionName = defaultHostingVersion.Name,
        Message = "Test release in channel",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-with-channel"),
		})
		if err != nil {
			return err
		}
		defaultHostingVersion, err := firebase.NewHostingVersion(ctx, "default", &firebase.HostingVersionArgs{
			SiteId: _default.SiteId,
			Config: &firebase.HostingVersionConfigArgs{
				Redirects: firebase.HostingVersionConfigRedirectArray{
					&firebase.HostingVersionConfigRedirectArgs{
						Glob:       pulumi.String("/google/**"),
						StatusCode: pulumi.Int(302),
						Location:   pulumi.String("https://www.google.com"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		defaultHostingChannel, err := firebase.NewHostingChannel(ctx, "default", &firebase.HostingChannelArgs{
			SiteId:    _default.SiteId,
			ChannelId: pulumi.String("channel-id"),
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
			SiteId:      _default.SiteId,
			ChannelId:   defaultHostingChannel.ChannelId,
			VersionName: defaultHostingVersion.Name,
			Message:     pulumi.String("Test release in channel"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_firebase_hostingsite" "default" {
  project = "my-project-name"
  site_id = "site-with-channel"
}
resource "gcp_firebase_hostingversion" "default" {
  site_id = gcp_firebase_hostingsite.default.site_id
  config = {
    redirects = [{
      "glob"       = "/google/**"
      "statusCode" = 302
      "location"   = "https://www.google.com"
    }]
  }
}
resource "gcp_firebase_hostingchannel" "default" {
  site_id    = gcp_firebase_hostingsite.default.site_id
  channel_id = "channel-id"
}
resource "gcp_firebase_hostingrelease" "default" {
  site_id      = gcp_firebase_hostingsite.default.site_id
  channel_id   = gcp_firebase_hostingchannel.default.channel_id
  version_name = gcp_firebase_hostingversion.default.name
  message      = "Test release in channel"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.HostingSite;
import com.pulumi.gcp.firebase.HostingSiteArgs;
import com.pulumi.gcp.firebase.HostingVersion;
import com.pulumi.gcp.firebase.HostingVersionArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigArgs;
import com.pulumi.gcp.firebase.inputs.HostingVersionConfigRedirectArgs;
import com.pulumi.gcp.firebase.HostingChannel;
import com.pulumi.gcp.firebase.HostingChannelArgs;
import com.pulumi.gcp.firebase.HostingRelease;
import com.pulumi.gcp.firebase.HostingReleaseArgs;
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 HostingSite("default", HostingSiteArgs.builder()
            .project("my-project-name")
            .siteId("site-with-channel")
            .build());

        var defaultHostingVersion = new HostingVersion("defaultHostingVersion", HostingVersionArgs.builder()
            .siteId(default_.siteId())
            .config(HostingVersionConfigArgs.builder()
                .redirects(HostingVersionConfigRedirectArgs.builder()
                    .glob("/google/**")
                    .statusCode(302)
                    .location("https://www.google.com")
                    .build())
                .build())
            .build());

        var defaultHostingChannel = new HostingChannel("defaultHostingChannel", HostingChannelArgs.builder()
            .siteId(default_.siteId())
            .channelId("channel-id")
            .build());

        var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
            .siteId(default_.siteId())
            .channelId(defaultHostingChannel.channelId())
            .versionName(defaultHostingVersion.name())
            .message("Test release in channel")
            .build());

    }
}
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-with-channel
  defaultHostingVersion:
    type: gcp:firebase:HostingVersion
    name: default
    properties:
      siteId: ${default.siteId}
      config:
        redirects:
          - glob: /google/**
            statusCode: 302
            location: https://www.google.com
  defaultHostingChannel:
    type: gcp:firebase:HostingChannel
    name: default
    properties:
      siteId: ${default.siteId}
      channelId: channel-id
  defaultHostingRelease:
    type: gcp:firebase:HostingRelease
    name: default
    properties:
      siteId: ${default.siteId}
      channelId: ${defaultHostingChannel.channelId}
      versionName: ${defaultHostingVersion.name}
      message: Test release in channel

Firebasehosting Release Disable

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 pulumi
import pulumi_gcp as gcp

default = gcp.firebase.HostingSite("default",
    project="my-project-name",
    site_id="site-id")
default_hosting_release = gcp.firebase.HostingRelease("default",
    site_id=default.site_id,
    type="SITE_DISABLE",
    message="Take down site")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var @default = new Gcp.Firebase.HostingSite("default", new()
    {
        Project = "my-project-name",
        SiteId = "site-id",
    });

    var defaultHostingRelease = new Gcp.Firebase.HostingRelease("default", new()
    {
        SiteId = @default.SiteId,
        Type = "SITE_DISABLE",
        Message = "Take down site",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/firebase"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := firebase.NewHostingSite(ctx, "default", &firebase.HostingSiteArgs{
			Project: pulumi.String("my-project-name"),
			SiteId:  pulumi.String("site-id"),
		})
		if err != nil {
			return err
		}
		_, err = firebase.NewHostingRelease(ctx, "default", &firebase.HostingReleaseArgs{
			SiteId:  _default.SiteId,
			Type:    pulumi.String("SITE_DISABLE"),
			Message: pulumi.String("Take down site"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_firebase_hostingsite" "default" {
  project = "my-project-name"
  site_id = "site-id"
}
resource "gcp_firebase_hostingrelease" "default" {
  site_id = gcp_firebase_hostingsite.default.site_id
  type    = "SITE_DISABLE"
  message = "Take down site"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firebase.HostingSite;
import com.pulumi.gcp.firebase.HostingSiteArgs;
import com.pulumi.gcp.firebase.HostingRelease;
import com.pulumi.gcp.firebase.HostingReleaseArgs;
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 HostingSite("default", HostingSiteArgs.builder()
            .project("my-project-name")
            .siteId("site-id")
            .build());

        var defaultHostingRelease = new HostingRelease("defaultHostingRelease", HostingReleaseArgs.builder()
            .siteId(default_.siteId())
            .type("SITE_DISABLE")
            .message("Take down site")
            .build());

    }
}
resources:
  default:
    type: gcp:firebase:HostingSite
    properties:
      project: my-project-name
      siteId: site-id
  defaultHostingRelease:
    type: gcp:firebase:HostingRelease
    name: default
    properties:
      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:

$ pulumi import gcp:firebase/hostingRelease:HostingRelease default sites/{{site_id}}/channels/{{channel_id}}/releases/{{release_id}}
$ pulumi import gcp:firebase/hostingRelease:HostingRelease default sites/{{site_id}}/releases/{{release_id}}
$ pulumi import gcp:firebase/hostingRelease:HostingRelease default {{site_id}}/{{channel_id}}/{{release_id}}
$ pulumi import gcp:firebase/hostingRelease:HostingRelease default {{site_id}}/{{release_id}}

Constructors

HostingRelease(String name, {HostingReleaseArgs? args, CustomResourceOptions? options})
Creates a new HostingRelease. name The Pulumi resource name. args Arguments used to configure this HostingRelease. The set of arguments for HostingRelease. options Resource options controlling this resource's behavior.
HostingRelease.reference(String urn)
Creates a typed reference to an existing HostingRelease resource.

Properties

channelId ↔ Output<String?>
The ID of the channel to which the release belongs. If not provided, the release will belong to the default "live" channel
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
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
message ↔ Output<String?>
The deploy description when the release was created. The value can be up to 512 characters.
latefinal
name ↔ Output<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
latefinal
releaseId ↔ Output<String>
The unique identifier for the Release.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
siteId ↔ Output<String>
Required. The ID of the site to which the release belongs.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
type ↔ 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.
latefinal
urn ↔ Output<String>
latefinalinherited
versionName ↔ 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.
latefinal

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

Static Methods

get(String name, Input<String> id, {HostingReleaseState? state, CustomResourceOptions? options}) → HostingRelease
Gets an existing HostingRelease resource's state with the given name and id.