From d4048c9100b4e1207a5cdcacc7f4f62b66eb9192 Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 17 Apr 2024 15:50:23 -0700 Subject: [PATCH] Add "path" property to rewrite config for firebase hosting version (#10448) (#17896) [upstream:19039f08e6731fc0b54a3fc892c4d4d5ab9af752] Signed-off-by: Modular Magician --- .changelog/10448.txt | 3 ++ .../r/firebase_hosting_version.html.markdown | 32 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .changelog/10448.txt diff --git a/.changelog/10448.txt b/.changelog/10448.txt new file mode 100644 index 00000000000..c93b028b651 --- /dev/null +++ b/.changelog/10448.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +firebasehosting: added `path` field to `google_firebase_hosting_version` +``` \ No newline at end of file diff --git a/website/docs/r/firebase_hosting_version.html.markdown b/website/docs/r/firebase_hosting_version.html.markdown index 33c064f8367..e25b6a957da 100644 --- a/website/docs/r/firebase_hosting_version.html.markdown +++ b/website/docs/r/firebase_hosting_version.html.markdown @@ -59,6 +59,34 @@ resource "google_firebase_hosting_release" "default" { message = "Redirect to Google" } ``` +## Example Usage - Firebasehosting Version Path + + +```hcl +resource "google_firebase_hosting_site" "default" { + provider = google-beta + project = "my-project-name" + site_id = "site-id" +} + +resource "google_firebase_hosting_version" "default" { + provider = google-beta + site_id = google_firebase_hosting_site.default.site_id + config { + rewrites { + glob = "**" + path = "/index.html" + } + } +} + +resource "google_firebase_hosting_release" "default" { + provider = google-beta + site_id = google_firebase_hosting_site.default.site_id + version_name = google_firebase_hosting_version.default.name + message = "Path Rewrite" +} +``` ## Example Usage - Firebasehosting Version Cloud Run @@ -209,6 +237,10 @@ The following arguments are supported: (Optional) The user-supplied RE2 regular expression to match against the request URL path. +* `path` - + (Optional) + The URL path to rewrite the request to. + * `function` - (Optional) The function to proxy requests to. Must match the exported function name exactly.