HostingChannel class
A Channel represents a stream of releases for a site. All sites have a default
live channel that serves content to the Firebase-provided subdomains and any
connected custom domains.
> 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 Channel, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage
Firebasehosting Channel Basic
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 defaultHostingChannel = new gcp.firebase.HostingChannel("default", {
siteId: _default.siteId,
channelId: "channel-basic",
});
import pulumi
import pulumi_gcp as gcp
default = gcp.firebase.HostingSite("default",
project="my-project-name",
site_id="site-with-channel")
default_hosting_channel = gcp.firebase.HostingChannel("default",
site_id=default.site_id,
channel_id="channel-basic")
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 defaultHostingChannel = new Gcp.Firebase.HostingChannel("default", new()
{
SiteId = @default.SiteId,
ChannelId = "channel-basic",
});
});
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
}
_, err = firebase.NewHostingChannel(ctx, "default", &firebase.HostingChannelArgs{
SiteId: _default.SiteId,
ChannelId: pulumi.String("channel-basic"),
})
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_hostingchannel" "default" {
site_id = gcp_firebase_hostingsite.default.site_id
channel_id = "channel-basic"
}
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.HostingChannel;
import com.pulumi.gcp.firebase.HostingChannelArgs;
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 defaultHostingChannel = new HostingChannel("defaultHostingChannel", HostingChannelArgs.builder()
.siteId(default_.siteId())
.channelId("channel-basic")
.build());
}
}
resources:
default:
type: gcp:firebase:HostingSite
properties:
project: my-project-name
siteId: site-with-channel
defaultHostingChannel:
type: gcp:firebase:HostingChannel
name: default
properties:
siteId: ${default.siteId}
channelId: channel-basic
Firebasehosting Channel Full
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 full = new gcp.firebase.HostingChannel("full", {
siteId: _default.siteId,
channelId: "channel-full",
ttl: "86400s",
retainedReleaseCount: 20,
labels: {
"some-key": "some-value",
},
});
import pulumi
import pulumi_gcp as gcp
default = gcp.firebase.HostingSite("default",
project="my-project-name",
site_id="site-with-channel")
full = gcp.firebase.HostingChannel("full",
site_id=default.site_id,
channel_id="channel-full",
ttl="86400s",
retained_release_count=20,
labels={
"some-key": "some-value",
})
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 full = new Gcp.Firebase.HostingChannel("full", new()
{
SiteId = @default.SiteId,
ChannelId = "channel-full",
Ttl = "86400s",
RetainedReleaseCount = 20,
Labels =
{
{ "some-key", "some-value" },
},
});
});
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
}
_, err = firebase.NewHostingChannel(ctx, "full", &firebase.HostingChannelArgs{
SiteId: _default.SiteId,
ChannelId: pulumi.String("channel-full"),
Ttl: pulumi.String("86400s"),
RetainedReleaseCount: pulumi.Int(20),
Labels: pulumi.StringMap{
"some-key": pulumi.String("some-value"),
},
})
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_hostingchannel" "full" {
site_id = gcp_firebase_hostingsite.default.site_id
channel_id = "channel-full"
ttl = "86400s"
retained_release_count = 20
labels = {
"some-key" = "some-value"
}
}
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.HostingChannel;
import com.pulumi.gcp.firebase.HostingChannelArgs;
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 full = new HostingChannel("full", HostingChannelArgs.builder()
.siteId(default_.siteId())
.channelId("channel-full")
.ttl("86400s")
.retainedReleaseCount(20)
.labels(Map.of("some-key", "some-value"))
.build());
}
}
resources:
default:
type: gcp:firebase:HostingSite
properties:
project: my-project-name
siteId: site-with-channel
full:
type: gcp:firebase:HostingChannel
properties:
siteId: ${default.siteId}
channelId: channel-full
ttl: 86400s
retainedReleaseCount: 20
labels:
some-key: some-value
Import
Channel can be imported using any of these accepted formats:
sites/{{site_id}}/channels/{{channel_id}}{{site_id}}/{{channel_id}}
When using the pulumi import command, Channel can be imported using one of the formats above. For example:
$ pulumi import gcp:firebase/hostingChannel:HostingChannel default sites/{{site_id}}/channels/{{channel_id}}
$ pulumi import gcp:firebase/hostingChannel:HostingChannel default {{site_id}}/{{channel_id}}
Constructors
- HostingChannel(String name, {HostingChannelArgs? args, CustomResourceOptions? options})
-
Creates a new HostingChannel.
nameThe Pulumi resource name.argsArguments used to configure this HostingChannel. The set of arguments for HostingChannel.optionsResource options controlling this resource's behavior. - HostingChannel.reference(String urn)
- Creates a typed reference to an existing HostingChannel resource.
Properties
-
channelId
↔ Output<
String> -
Required. Immutable. A unique ID within the site that identifies the channel.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
effectiveLabels
↔ Output<
Map< String, String> > -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
-
expireTime
↔ Output<
String> -
The time at which the channel will be automatically deleted. If null, the channel
will not be automatically deleted. This field is present in the output whether it's
set directly or via the
ttlfield.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
-
labels
↔ Output<
Map< String, String> ?> -
Text labels used for extra metadata and/or filtering
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource.latefinal -
name
↔ Output<
String> -
The fully-qualified resource name for the channel, in the format:
sites/SITE_ID/channels/CHANNEL_ID
latefinal
-
pulumiLabels
↔ Output<
Map< String, String> > -
The combination of labels configured directly on the resource
and default labels configured on the provider.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
retainedReleaseCount
↔ Output<
int> -
The number of previous releases to retain on the channel for rollback or other
purposes. Must be a number between 1-100. Defaults to 10 for new channels.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
siteId
↔ Output<
String> -
Required. The ID of the site in which to create this channel.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
ttl
↔ Output<
String?> -
Input only. A time-to-live for this channel. Sets
expireTimeto the provided duration past the time of the request. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "86400s" (one day).latefinal -
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
Static Methods
-
get(
String name, Input< String> id, {HostingChannelState? state, CustomResourceOptions? options}) → HostingChannel -
Gets an existing HostingChannel resource's state with the given
nameandid.