googleFirebaseHostingRelease
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:
- API documentation
- How-to Guides
- Official Documentation
Example Usage - Firebasehosting Release In Site
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleFirebaseHostingSiteDefault =
new google.firebaseHostingSite.FirebaseHostingSite(this, "default", {
project: "my-project-name",
provider: "${google-beta}",
site_id: "site-id",
});
const googleFirebaseHostingVersionDefault =
new google.firebaseHostingVersion.FirebaseHostingVersion(this, "default_1", {
config: [
{
redirects: [
{
glob: "/google/**",
location: "https://www.google.com",
status_code: 302,
},
],
},
],
provider: "${google-beta}",
site_id: googleFirebaseHostingSiteDefault.siteId,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
googleFirebaseHostingVersionDefault.overrideLogicalId("default");
const googleFirebaseHostingReleaseDefault =
new google.firebaseHostingRelease.FirebaseHostingRelease(this, "default_2", {
message: "Test release",
provider: "${google-beta}",
site_id: googleFirebaseHostingSiteDefault.siteId,
version_name: googleFirebaseHostingVersionDefault.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
googleFirebaseHostingReleaseDefault.overrideLogicalId("default");
Example Usage - Firebasehosting Release In Channel
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleFirebaseHostingSiteDefault =
new google.firebaseHostingSite.FirebaseHostingSite(this, "default", {
project: "my-project-name",
provider: "${google-beta}",
site_id: "site-with-channel",
});
const googleFirebaseHostingVersionDefault =
new google.firebaseHostingVersion.FirebaseHostingVersion(this, "default_1", {
config: [
{
redirects: [
{
glob: "/google/**",
location: "https://www.google.com",
status_code: 302,
},
],
},
],
provider: "${google-beta}",
site_id: googleFirebaseHostingSiteDefault.siteId,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
googleFirebaseHostingVersionDefault.overrideLogicalId("default");
const googleFirebaseHostingChannelDefault =
new google.firebaseHostingChannel.FirebaseHostingChannel(this, "default_2", {
channel_id: "channel-id",
provider: "${google-beta}",
site_id: googleFirebaseHostingSiteDefault.siteId,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
googleFirebaseHostingChannelDefault.overrideLogicalId("default");
const googleFirebaseHostingReleaseDefault =
new google.firebaseHostingRelease.FirebaseHostingRelease(this, "default_3", {
channel_id: googleFirebaseHostingChannelDefault.channelId,
message: "Test release in channel",
provider: "${google-beta}",
site_id: googleFirebaseHostingSiteDefault.siteId,
version_name: googleFirebaseHostingVersionDefault.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
googleFirebaseHostingReleaseDefault.overrideLogicalId("default");
Example Usage - Firebasehosting Release Disable
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
const googleFirebaseHostingSiteDefault =
new google.firebaseHostingSite.FirebaseHostingSite(this, "default", {
project: "my-project-name",
provider: "${google-beta}",
site_id: "site-id",
});
const googleFirebaseHostingReleaseDefault =
new google.firebaseHostingRelease.FirebaseHostingRelease(this, "default_1", {
message: "Take down site",
provider: "${google-beta}",
site_id: googleFirebaseHostingSiteDefault.siteId,
type: "SITE_DISABLE",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
googleFirebaseHostingReleaseDefault.overrideLogicalId("default");
Argument Reference
The following arguments are supported:
siteId
- (Required) Required. The ID of the site to which the release belongs.
-
type
- (Optional) The type of the release; indicates what happened to the content of the site. There is no need to specifydeploy
orrollback
type if aversionName
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 aredeploy
,rollback
, andsiteDisable
. -
message
- (Optional) The deploy description when the release was created. The value can be up to 512 characters. -
channelId
- (Optional) The ID of the channel to which the release belongs. If not provided, the release will belong to the default "live" channel -
versionName
- (Optional) 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 thesiteId
. This parameter must be empty if thetype
of the release issiteDisable
.
Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
-
id
- an identifier for the resource with formatsites/{{siteId}}/channels/{{channelId}}/releases/{{releaseId}}
-
name
- 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 -
releaseId
- The unique identifier for the Release.
Timeouts
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.
Import
Release can be imported using any of these accepted formats:
$ terraform import google_firebase_hosting_release.default sites/{{site_id}}/channels/{{channel_id}}/releases/{{release_id}}
$ terraform import google_firebase_hosting_release.default sites/{{site_id}}/releases/{{release_id}}
$ terraform import google_firebase_hosting_release.default {{site_id}}/{{channel_id}}/{{release_id}}
$ terraform import google_firebase_hosting_release.default {{site_id}}/{{release_id}}