Add path_template_match and path_template_rewrite support to net-lb-app-ext (required for React apps for example).

This commit is contained in:
Taneli Leppä
2024-11-19 09:03:11 +01:00
committed by Wiktor Niesiobędzki
parent 817df69ff8
commit 73b6088132
3 changed files with 18 additions and 9 deletions

View File

@@ -703,6 +703,11 @@ resource "google_compute_url_map" "default" {
? match_rules.value.path.value
: null
)
path_template_match = (
try(match_rules.value.path.type, null) == "template"
? match_rules.value.path.value
: null
)
dynamic "header_matches" {
for_each = toset(coalesce(match_rules.value.headers, []))
iterator = h
@@ -873,8 +878,9 @@ resource "google_compute_url_map" "default" {
: [route_action.value.url_rewrite]
)
content {
host_rewrite = url_rewrite.value.host
path_prefix_rewrite = url_rewrite.value.path_prefix
host_rewrite = url_rewrite.value.host
path_prefix_rewrite = url_rewrite.value.path_prefix
path_template_rewrite = url_rewrite.value.path_template
}
}
dynamic "weighted_backend_services" {