google_firebase_hosting_channel

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.

To get more information about Channel, see:

Example Usage - Firebasehosting Channel Basic

resource "google_firebase_hosting_site" "default" {
  provider = google-beta
  project  = "my-project-name"
  site_id = "site-with-channel"
}

resource "google_firebase_hosting_channel" "default" {
  provider = google-beta
  site_id = google_firebase_hosting_site.default.site_id
  channel_id = "channel-basic"
}

Example Usage - Firebasehosting Channel Full

resource "google_firebase_hosting_site" "default" {
  provider = google-beta
  project  = "my-project-name"
  site_id = "site-with-channel"
}

resource "google_firebase_hosting_channel" "full" {
  provider = google-beta
  site_id = google_firebase_hosting_site.default.site_id
  channel_id = "channel-full"
  ttl = "86400s"
  retained_release_count = 20
  labels = {
    "some-key": "some-value"
  }
}

Argument Reference

The following arguments are supported:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Channel can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Channel using one of the formats above. For example:

import {
  id = "sites/{{site_id}}/channels/{{channel_id}}"
  to = google_firebase_hosting_channel.default
}

When using the terraform import command, Channel can be imported using one of the formats above. For example:

$ terraform import google_firebase_hosting_channel.default sites/{{site_id}}/channels/{{channel_id}}
$ terraform import google_firebase_hosting_channel.default {{site_id}}/{{channel_id}}