Skip to content

Latest commit

 

History

History
129 lines (93 loc) · 4.14 KB

firebase_hosting_site.html.markdown

File metadata and controls

129 lines (93 loc) · 4.14 KB
subcategory page_title description
Firebase Hosting
Google: google_firebase_hosting_site
A `Site` represents a Firebase Hosting site.

google_firebase_hosting_site

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

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

Example Usage - Firebasehosting Site Full

resource "google_firebase_web_app" "default" {
  provider = google-beta
  project  = "my-project-name"
  display_name = "Test web app for Firebase Hosting"
  deletion_policy = "DELETE"
}

resource "google_firebase_hosting_site" "full" {
  provider = google-beta
  project  = "my-project-name"
  site_id = "site-with-app"
  app_id = google_firebase_web_app.default.app_id
}

Argument Reference

The following arguments are supported:


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

  • site_id - (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/{{site_id}}

  • 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.

  • default_url - 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.