|
| 1 | +--- |
| 2 | +# ---------------------------------------------------------------------------- |
| 3 | +# |
| 4 | +# *** AUTO GENERATED CODE *** Type: MMv1 *** |
| 5 | +# |
| 6 | +# ---------------------------------------------------------------------------- |
| 7 | +# |
| 8 | +# This file is automatically generated by Magic Modules and manual |
| 9 | +# changes will be clobbered when the file is regenerated. |
| 10 | +# |
| 11 | +# Please read more about how to change this file in |
| 12 | +# .github/CONTRIBUTING.md. |
| 13 | +# |
| 14 | +# ---------------------------------------------------------------------------- |
| 15 | +subcategory: "Firebase Hosting" |
| 16 | +page_title: "Google: google_firebase_hosting_channel" |
| 17 | +description: |- |
| 18 | + A `Channel` represents a stream of releases for a site. |
| 19 | +--- |
| 20 | + |
| 21 | +# google\_firebase\_hosting\_channel |
| 22 | + |
| 23 | +A `Channel` represents a stream of releases for a site. All sites have a default |
| 24 | +`live` channel that serves content to the Firebase-provided subdomains and any |
| 25 | +connected custom domains. |
| 26 | + |
| 27 | +~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. |
| 28 | +See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources. |
| 29 | + |
| 30 | +To get more information about Channel, see: |
| 31 | + |
| 32 | +* [API documentation](https://firebase.google.com/docs/reference/hosting/rest/v1beta1/sites.channels) |
| 33 | +* How-to Guides |
| 34 | + * [Official Documentation](https://firebase.google.com/docs/hosting) |
| 35 | + |
| 36 | +## Example Usage - Firebasehosting Channel Basic |
| 37 | + |
| 38 | + |
| 39 | +```hcl |
| 40 | +resource "google_firebase_hosting_site" "default" { |
| 41 | + provider = google-beta |
| 42 | + project = "my-project-name" |
| 43 | + site_id = "site-with-channel" |
| 44 | +} |
| 45 | +
|
| 46 | +resource "google_firebase_hosting_channel" "default" { |
| 47 | + provider = google-beta |
| 48 | + site_id = google_firebase_hosting_site.default.site_id |
| 49 | + channel_id = "channel-basic" |
| 50 | +} |
| 51 | +``` |
| 52 | +## Example Usage - Firebasehosting Channel Full |
| 53 | + |
| 54 | + |
| 55 | +```hcl |
| 56 | +resource "google_firebase_hosting_site" "default" { |
| 57 | + provider = google-beta |
| 58 | + project = "my-project-name" |
| 59 | + site_id = "site-with-channel" |
| 60 | +} |
| 61 | +
|
| 62 | +resource "google_firebase_hosting_channel" "full" { |
| 63 | + provider = google-beta |
| 64 | + site_id = google_firebase_hosting_site.default.site_id |
| 65 | + channel_id = "channel-full" |
| 66 | + ttl = "86400s" |
| 67 | + retained_release_count = 20 |
| 68 | + labels = { |
| 69 | + "some-key": "some-value" |
| 70 | + } |
| 71 | +} |
| 72 | +``` |
| 73 | + |
| 74 | +## Argument Reference |
| 75 | + |
| 76 | +The following arguments are supported: |
| 77 | + |
| 78 | + |
| 79 | +* `site_id` - |
| 80 | + (Required) |
| 81 | + Required. The ID of the site in which to create this channel. |
| 82 | + |
| 83 | +* `channel_id` - |
| 84 | + (Required) |
| 85 | + Required. Immutable. A unique ID within the site that identifies the channel. |
| 86 | + |
| 87 | + |
| 88 | +- - - |
| 89 | + |
| 90 | + |
| 91 | +* `retained_release_count` - |
| 92 | + (Optional) |
| 93 | + The number of previous releases to retain on the channel for rollback or other |
| 94 | + purposes. Must be a number between 1-100. Defaults to 10 for new channels. |
| 95 | + |
| 96 | +* `labels` - |
| 97 | + (Optional) |
| 98 | + Text labels used for extra metadata and/or filtering |
| 99 | + |
| 100 | +* `expire_time` - |
| 101 | + (Optional) |
| 102 | + The time at which the channel will be automatically deleted. If null, the channel |
| 103 | + will not be automatically deleted. This field is present in the output whether it's |
| 104 | + set directly or via the `ttl` field. |
| 105 | + |
| 106 | +* `ttl` - |
| 107 | + (Optional) |
| 108 | + Input only. A time-to-live for this channel. Sets `expire_time` to the provided |
| 109 | + duration past the time of the request. A duration in seconds with up to nine fractional |
| 110 | + digits, terminated by 's'. Example: "86400s" (one day). |
| 111 | + |
| 112 | + |
| 113 | +## Attributes Reference |
| 114 | + |
| 115 | +In addition to the arguments listed above, the following computed attributes are exported: |
| 116 | + |
| 117 | +* `id` - an identifier for the resource with format `sites/{{site_id}}/channels/{{channel_id}}` |
| 118 | + |
| 119 | +* `name` - |
| 120 | + The fully-qualified resource name for the channel, in the format: |
| 121 | + sites/SITE_ID/channels/CHANNEL_ID |
| 122 | + |
| 123 | + |
| 124 | +## Timeouts |
| 125 | + |
| 126 | +This resource provides the following |
| 127 | +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: |
| 128 | + |
| 129 | +- `create` - Default is 20 minutes. |
| 130 | +- `update` - Default is 20 minutes. |
| 131 | +- `delete` - Default is 20 minutes. |
| 132 | + |
| 133 | +## Import |
| 134 | + |
| 135 | + |
| 136 | +Channel can be imported using any of these accepted formats: |
| 137 | + |
| 138 | +``` |
| 139 | +$ terraform import google_firebase_hosting_channel.default sites/{{site_id}}/channels/{{channel_id}} |
| 140 | +$ terraform import google_firebase_hosting_channel.default {{site_id}}/{{channel_id}} |
| 141 | +``` |
0 commit comments