Skip to content

googleFirebaseHostingSite

A site represents a Firebase Hosting site.

\~> 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 Site, see:

Example Usage - Firebasehosting Site Basic

/*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.*/
new google.firebaseHostingSite.FirebaseHostingSite(this, "default", {
  project: "my-project-name",
  provider: "${google-beta}",
  site_id: "site-no-app",
});

Example Usage - Firebasehosting Site Full

/*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 googleFirebaseWebAppDefault = new google.firebaseWebApp.FirebaseWebApp(
  this,
  "default",
  {
    deletion_policy: "DELETE",
    display_name: "Test web app for Firebase Hosting",
    project: "my-project-name",
    provider: "${google-beta}",
  }
);
new google.firebaseHostingSite.FirebaseHostingSite(this, "full", {
  app_id: googleFirebaseWebAppDefault.appId,
  project: "my-project-name",
  provider: "${google-beta}",
  site_id: "site-with-app",
});

Argument Reference

The following arguments are supported:


  • appId - (Optional) Optional. The ID of a Web App associated with the Hosting site.

  • siteId - (Optional) Required. Immutable. A globally unique identifier for the Hosting site. This identifier is used to construct the Firebase-provisioned subdomains for the site, so it must also be a valid domain name label.

  • project - (Optional) The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Attributes Reference

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

  • id - an identifier for the resource with format projects/{{project}}/sites/{{siteId}}

  • name - Output only. The fully-qualified resource name of the Hosting site, in the format: projects/PROJECT_IDENTIFIER/sites/SITE_ID PROJECT_IDENTIFIER: the Firebase project's projectNumber (recommended) or its projectId. Learn more about using project identifiers in Google's AIP 2510 standard.

  • defaultUrl - The default URL for the site in the form of https://{name}.web.app

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 20 minutes.
  • update - Default is 20 minutes.
  • delete - Default is 20 minutes.

Import

Site can be imported using any of these accepted formats:

$ terraform import google_firebase_hosting_site.default projects/{{project}}/sites/{{site_id}}
$ terraform import google_firebase_hosting_site.default {{project}}/{{site_id}}
$ terraform import google_firebase_hosting_site.default sites/{{site_id}}
$ terraform import google_firebase_hosting_site.default {{site_id}}

User Project Overrides

This resource supports User Project Overrides.