Skip to content

Commit

Permalink
Add regex
Browse files Browse the repository at this point in the history
  • Loading branch information
rainshen49 committed Dec 10, 2024
1 parent 79dbae0 commit 636bc38
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mmv1/products/firebasehosting/Version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ examples:
site_id: 'site-id'
test_env_vars:
project_id: 'PROJECT_NAME'
- name: 'firebasehosting_version_headers_regex'
primary_resource_id: 'default'
min_version: 'beta'
vars:
site_id: 'site-id'
test_env_vars:
project_id: 'PROJECT_NAME'
- name: 'firebasehosting_version_path'
primary_resource_id: 'default'
min_version: 'beta'
Expand Down
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"
}

0 comments on commit 636bc38

Please sign in to comment.