Skip to content

Commit c73b515

Browse files
committed
change default load balancing scheme for EXTERNAL_MANAGED for global compute Lb resources
1 parent d899382 commit c73b515

32 files changed

Lines changed: 265 additions & 168 deletions

mmv1/products/compute/BackendService.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ samples:
6767
- name: 'backend_service_basic'
6868
resource_id_vars:
6969
backend_service_name: 'backend-service'
70-
http_health_check_name: 'health-check'
70+
health_check_name: 'health-check'
7171
- name: 'backend_service_external_iap'
7272
primary_resource_id: 'default'
7373
steps:
@@ -80,7 +80,7 @@ samples:
8080
- name: 'backend_service_cache_simple'
8181
resource_id_vars:
8282
backend_service_name: 'backend-service'
83-
http_health_check_name: 'health-check'
83+
health_check_name: 'health-check'
8484
- name: 'backend_service_cache_include_http_headers'
8585
primary_resource_id: 'default'
8686
steps:
@@ -99,14 +99,14 @@ samples:
9999
- name: 'backend_service_cache'
100100
resource_id_vars:
101101
backend_service_name: 'backend-service'
102-
http_health_check_name: 'health-check'
102+
health_check_name: 'health-check'
103103
- name: 'backend_service_cache_bypass_cache_on_request_headers'
104104
primary_resource_id: 'default'
105105
steps:
106106
- name: 'backend_service_cache_bypass_cache_on_request_headers'
107107
resource_id_vars:
108108
backend_service_name: 'backend-service'
109-
http_health_check_name: 'health-check'
109+
health_check_name: 'health-check'
110110
- name: 'backend_service_traffic_director_round_robin'
111111
primary_resource_id: 'default'
112112
min_version: 'beta'
@@ -961,7 +961,7 @@ properties:
961961
external load balancing. A backend service created for one type of
962962
load balancing cannot be used with the other. For more information, refer to
963963
[Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).
964-
default_value: "EXTERNAL"
964+
default_value: "EXTERNAL_MANAGED"
965965
# If you're modifying this value, it probably means Global ILB is now
966966
# an option. If that's the case, all of the documentation is based on
967967
# this resource supporting external load balancing only.

mmv1/products/compute/GlobalForwardingRule.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ properties:
353353
354354
For more information about forwarding rules, refer to
355355
[Forwarding rule concepts](https://cloud.google.com/load-balancing/docs/forwarding-rule-concepts).
356-
default_value: "EXTERNAL"
356+
default_value: "EXTERNAL_MANAGED"
357357
enum_values:
358358
- 'EXTERNAL'
359359
- 'EXTERNAL_MANAGED'

mmv1/products/iap/WebBackendService.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ samples:
4545
config_path: templates/terraform/samples/services/compute/backend_service_basic.tf.tmpl
4646
resource_id_vars:
4747
backend_service_name: 'backend-service'
48-
http_health_check_name: 'health-check'
48+
health_check_name: 'health-check'
4949
parameters:
5050
properties:
5151
- name: 'name'
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
22
name = "{{index $.ResourceIdVars "backend_service_name"}}"
3-
health_checks = [google_compute_http_health_check.default.id]
3+
health_checks = [google_compute_health_check.default.id]
44
}
55

6-
resource "google_compute_http_health_check" "default" {
7-
name = "{{index $.ResourceIdVars "http_health_check_name"}}"
8-
request_path = "/"
6+
resource "google_compute_health_check" "default" {
7+
name = "{{index $.ResourceIdVars "health_check_name"}}"
98
check_interval_sec = 1
109
timeout_sec = 1
10+
http_health_check {
11+
port = 80
12+
request_path = "/"
13+
}
1114
}
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
22
name = "{{index $.ResourceIdVars "backend_service_name"}}"
3-
health_checks = [google_compute_http_health_check.default.id]
3+
health_checks = [google_compute_health_check.default.id]
44
enable_cdn = true
55
cdn_policy {
66
cache_mode = "CACHE_ALL_STATIC"
@@ -12,9 +12,12 @@ resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
1212
}
1313
}
1414

15-
resource "google_compute_http_health_check" "default" {
16-
name = "{{index $.ResourceIdVars "http_health_check_name"}}"
17-
request_path = "/"
15+
resource "google_compute_health_check" "default" {
16+
name = "{{index $.ResourceIdVars "health_check_name"}}"
1817
check_interval_sec = 1
1918
timeout_sec = 1
19+
http_health_check {
20+
port = 80
21+
request_path = "/"
22+
}
2023
}

mmv1/templates/terraform/samples/services/compute/backend_service_cache_bypass_cache_on_request_headers.tf.tmpl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
22
name = "{{index $.ResourceIdVars "backend_service_name"}}"
3-
health_checks = [google_compute_http_health_check.default.id]
3+
health_checks = [google_compute_health_check.default.id]
44
enable_cdn = true
55
cdn_policy {
66
cache_mode = "CACHE_ALL_STATIC"
@@ -20,9 +20,12 @@ resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
2020
}
2121
}
2222

23-
resource "google_compute_http_health_check" "default" {
24-
name = "{{index $.ResourceIdVars "http_health_check_name"}}"
25-
request_path = "/"
23+
resource "google_compute_health_check" "default" {
24+
name = "{{index $.ResourceIdVars "health_check_name"}}"
2625
check_interval_sec = 1
2726
timeout_sec = 1
27+
http_health_check {
28+
port = 80
29+
request_path = "/"
30+
}
2831
}
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
22
name = "{{index $.ResourceIdVars "backend_service_name"}}"
3-
health_checks = [google_compute_http_health_check.default.id]
3+
health_checks = [google_compute_health_check.default.id]
44
enable_cdn = true
55
cdn_policy {
66
signed_url_cache_max_age_sec = 7200
77
}
88
}
99

10-
resource "google_compute_http_health_check" "default" {
11-
name = "{{index $.ResourceIdVars "http_health_check_name"}}"
12-
request_path = "/"
10+
resource "google_compute_health_check" "default" {
11+
name = "{{index $.ResourceIdVars "health_check_name"}}"
1312
check_interval_sec = 1
1413
timeout_sec = 1
14+
http_health_check {
15+
port = 80
16+
request_path = "/"
17+
}
1518
}

mmv1/templates/terraform/samples/services/compute/backend_service_dynamic_backends.tf.tmpl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,19 @@ resource "google_compute_backend_service" "default" {
6969
group = google_compute_instance_group.default[each.key].self_link
7070
}
7171

72-
health_checks = [google_compute_http_health_check.default[each.key].self_link]
72+
health_checks = [google_compute_health_check.default[each.key].self_link]
7373
port_name = "http"
7474
}
7575

76-
resource "google_compute_http_health_check" "default" {
76+
resource "google_compute_health_check" "default" {
7777
for_each = local.instances
7878
name = "${each.key}-hc"
79-
request_path = "/"
8079
check_interval_sec = 1
8180
timeout_sec = 1
81+
http_health_check {
82+
port = 80
83+
request_path = "/"
84+
}
8285
}
8386

8487

mmv1/templates/terraform/samples/services/compute/backend_service_signed_url_key.tf.tmpl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ resource "google_compute_backend_service" "example_backend" {
2020
group = google_compute_instance_group_manager.webservers.instance_group
2121
}
2222

23-
health_checks = [google_compute_http_health_check.default.id]
23+
health_checks = [google_compute_health_check.default.id]
2424
}
2525

2626
resource "google_compute_instance_group_manager" "webservers" {
@@ -51,9 +51,12 @@ resource "google_compute_instance_template" "webserver" {
5151
}
5252
}
5353

54-
resource "google_compute_http_health_check" "default" {
54+
resource "google_compute_health_check" "default" {
5555
name = "test"
56-
request_path = "/"
5756
check_interval_sec = 1
5857
timeout_sec = 1
58+
http_health_check {
59+
port = 80
60+
request_path = "/"
61+
}
5962
}

mmv1/templates/terraform/samples/services/compute/global_forwarding_rule_http.tf.tmpl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,15 @@ resource "google_compute_backend_service" "default" {
3737
protocol = "HTTP"
3838
timeout_sec = 10
3939

40-
health_checks = [google_compute_http_health_check.default.id]
40+
health_checks = [google_compute_health_check.default.id]
4141
}
4242

43-
resource "google_compute_http_health_check" "default" {
43+
resource "google_compute_health_check" "default" {
4444
name = "check-{{index $.ResourceIdVars "backend_service_name"}}"
45-
request_path = "/"
4645
check_interval_sec = 1
4746
timeout_sec = 1
47+
http_health_check {
48+
port = 80
49+
request_path = "/"
50+
}
4851
}

0 commit comments

Comments
 (0)