Skip to content

Commit

Permalink
Add "path" property to rewrite config for firebase hosting version (#…
Browse files Browse the repository at this point in the history
…10448) (#17896)

[upstream:19039f08e6731fc0b54a3fc892c4d4d5ab9af752]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Apr 17, 2024
1 parent cc03a6e commit d4048c9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/10448.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
firebasehosting: added `path` field to `google_firebase_hosting_version`
```
32 changes: 32 additions & 0 deletions website/docs/r/firebase_hosting_version.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit d4048c9

Please sign in to comment.