-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add headers to Hosting Version (#12527)
- Loading branch information
1 parent
b1ee4b6
commit 93c2b6e
Showing
3 changed files
with
122 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
mmv1/templates/terraform/examples/firebasehosting_version_headers.tf.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
resource "google_firebase_hosting_site" "default" { | ||
provider = google-beta | ||
project = "{{index $.TestEnvVars "project_id"}}" | ||
site_id = "{{index $.Vars "site_id"}}" | ||
} | ||
|
||
resource "google_firebase_hosting_version" "default" { | ||
provider = google-beta | ||
site_id = google_firebase_hosting_site.default.site_id | ||
config { | ||
headers { | ||
# Also okay to use regex | ||
glob = "/headers/**" | ||
headers = { | ||
my-header = "my-value" | ||
} | ||
} | ||
} | ||
} | ||
|
||
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 = "With custom headers" | ||
} |
26 changes: 26 additions & 0 deletions
26
mmv1/templates/terraform/examples/firebasehosting_version_headers_regex.tf.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
resource "google_firebase_hosting_site" "default" { | ||
provider = google-beta | ||
project = "{{index $.TestEnvVars "project_id"}}" | ||
site_id = "{{index $.Vars "site_id"}}" | ||
} | ||
|
||
resource "google_firebase_hosting_version" "default" { | ||
provider = google-beta | ||
site_id = google_firebase_hosting_site.default.site_id | ||
config { | ||
headers { | ||
# Also okay to use glob | ||
regex = "^~/headers$" | ||
headers = { | ||
my-header = "my-value" | ||
} | ||
} | ||
} | ||
} | ||
|
||
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 = "With custom headers" | ||
} |