Skip to content

Commit

Permalink
Merge branch 'master' into rune92/support-sovereign-compute-vm
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoo authored Dec 9, 2024
2 parents 781b83a + 3f86056 commit fb45e35
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 32 deletions.
2 changes: 1 addition & 1 deletion modules/cloud-run-v2/tags.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
resource "google_tags_location_tag_binding" "binding" {
for_each = var.create_job ? {} : var.tag_bindings
parent = (
"//run.googleapis.com/projects/${var.project_id}/locations/europe-west1/services/${google_cloud_run_v2_service.service[0].name}"
"//run.googleapis.com/projects/${var.project_id}/locations/${var.region}/services/${google_cloud_run_v2_service.service[0].name}"
)
tag_value = each.value
location = var.region
Expand Down
4 changes: 2 additions & 2 deletions modules/net-lb-app-ext-regional/README.md

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions modules/net-lb-app-ext-regional/urlmap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,11 @@ resource "google_compute_region_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
Expand Down Expand Up @@ -657,8 +662,9 @@ resource "google_compute_region_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" {
Expand Down
17 changes: 10 additions & 7 deletions modules/net-lb-app-ext-regional/variables-urlmap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ variable "urlmap_config" {
nanos = optional(number)
}))
url_rewrite = optional(object({
host = optional(string)
path_prefix = optional(string)
host = optional(string)
path_prefix = optional(string)
path_template = optional(string)
}))
weighted_backend_services = optional(map(object({
weight = number
Expand Down Expand Up @@ -154,8 +155,9 @@ variable "urlmap_config" {
nanos = optional(number)
}))
url_rewrite = optional(object({
host = optional(string)
path_prefix = optional(string)
host = optional(string)
path_prefix = optional(string)
path_template = optional(string)
}))
weighted_backend_services = optional(map(object({
weight = number
Expand Down Expand Up @@ -202,7 +204,7 @@ variable "urlmap_config" {
headers = optional(list(object({
name = string
invert_match = optional(bool, false)
type = optional(string, "present") # exact, prefix, suffix, regex, present, range
type = optional(string, "present") # exact, prefix, suffix, regex, present, range, template
value = optional(string)
range_value = optional(object({
end = string
Expand Down Expand Up @@ -261,8 +263,9 @@ variable "urlmap_config" {
nanos = optional(number)
}))
url_rewrite = optional(object({
host = optional(string)
path_prefix = optional(string)
host = optional(string)
path_prefix = optional(string)
path_template = optional(string)
}))
weighted_backend_services = optional(map(object({
weight = number
Expand Down
2 changes: 1 addition & 1 deletion modules/net-lb-app-ext/README.md

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions modules/net-lb-app-ext/urlmap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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" {
Expand Down
12 changes: 7 additions & 5 deletions modules/net-lb-app-ext/variables-urlmap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ variable "urlmap_config" {
nanos = optional(number)
}))
url_rewrite = optional(object({
host = optional(string)
path_prefix = optional(string)
host = optional(string)
path_prefix = optional(string)
path_template = optional(string)
}))
weighted_backend_services = optional(map(object({
weight = number
Expand Down Expand Up @@ -271,7 +272,7 @@ variable "urlmap_config" {
headers = optional(list(object({
name = string
invert_match = optional(bool, false)
type = optional(string, "present") # exact, prefix, suffix, regex, present, range
type = optional(string, "present") # exact, prefix, suffix, regex, present, range, template
value = optional(string)
range_value = optional(object({
end = string
Expand Down Expand Up @@ -330,8 +331,9 @@ variable "urlmap_config" {
nanos = optional(number)
}))
url_rewrite = optional(object({
host = optional(string)
path_prefix = optional(string)
host = optional(string)
path_prefix = optional(string)
path_template = optional(string)
}))
weighted_backend_services = optional(map(object({
weight = number
Expand Down
2 changes: 1 addition & 1 deletion modules/net-lb-app-int-cross-region/README.md

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions modules/net-lb-app-int-cross-region/urlmap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,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
Expand Down Expand Up @@ -496,8 +501,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" {
Expand Down
7 changes: 4 additions & 3 deletions modules/net-lb-app-int-cross-region/variables-urlmap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ variable "urlmap_config" {
headers = optional(list(object({
name = string
invert_match = optional(bool, false)
type = optional(string, "present") # exact, prefix, suffix, regex, present, range
type = optional(string, "present") # exact, prefix, suffix, regex, present, range, template
value = optional(string)
range_value = optional(object({
end = string
Expand Down Expand Up @@ -192,8 +192,9 @@ variable "urlmap_config" {
nanos = optional(number)
}))
url_rewrite = optional(object({
host = optional(string)
path_prefix = optional(string)
host = optional(string)
path_prefix = optional(string)
path_template = optional(string)
}))
weighted_backend_services = optional(map(object({
weight = number
Expand Down
Loading

0 comments on commit fb45e35

Please sign in to comment.