Skip to content

Commit 84b5239

Browse files
SLB: Add Support to isolationConfig on resource google_network_services_service_lb_policies (#15289)
1 parent 6b91b18 commit 84b5239

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

mmv1/products/networkservices/ServiceLbPolicies.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ examples:
5959
vars:
6060
resource_name: 'my-lb-policy'
6161
backend_name: 'my-lb-backend'
62+
- name: 'network_services_service_lb_policies_beta'
63+
min_version: 'beta'
64+
primary_resource_id: 'default'
65+
vars:
66+
resource_name: 'my-lb-policy'
67+
backend_name: 'my-lb-backend'
6268
parameters:
6369
- name: 'name'
6470
type: String
@@ -129,3 +135,27 @@ properties:
129135
Optional. The percentage threshold that a load balancer will begin to send traffic to failover backends. If the percentage of endpoints in a MIG/NEG is smaller than this value, traffic would be sent to failover backends if possible. This field should be set to a value between 1 and 99. The default value is 50 for Global external HTTP(S) load balancer (classic) and Proxyless service mesh, and 70 for others.
130136
min_version: 'beta'
131137
required: true
138+
- name: 'isolationConfig'
139+
type: NestedObject
140+
description: |
141+
Configuration to provide isolation support for the associated Backend Service.
142+
min_version: 'beta'
143+
properties:
144+
- name: 'isolationGranularity'
145+
type: Enum
146+
description: |
147+
The isolation granularity of the load balancer.
148+
min_version: 'beta'
149+
enum_values:
150+
- 'ISOLATION_GRANULARITY_UNSPECIFIED'
151+
- 'REGION'
152+
- name: 'isolationMode'
153+
type: Enum
154+
description: |
155+
The isolation mode of the load balancer.
156+
min_version: 'beta'
157+
enum_values:
158+
- 'ISOLATION_MODE_UNSPECIFIED'
159+
- 'NEAREST'
160+
- 'STRICT'
161+
default_value: 'NEAREST'
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
resource "google_network_services_service_lb_policies" "{{$.PrimaryResourceId}}" {
2+
provider = google-beta
3+
4+
name = "{{index $.Vars "resource_name"}}"
5+
location = "global"
6+
description = "my description"
7+
load_balancing_algorithm = "SPRAY_TO_REGION"
8+
9+
auto_capacity_drain {
10+
enable = true
11+
}
12+
13+
failover_config {
14+
failover_health_threshold = 70
15+
}
16+
17+
isolation_config {
18+
isolation_granularity = "REGION"
19+
isolation_mode = "NEAREST"
20+
}
21+
22+
labels = {
23+
foo = "bar"
24+
}
25+
}
26+
27+
resource "google_compute_backend_service" "default" {
28+
provider = google-beta
29+
30+
name = "{{index $.Vars "backend_name"}}"
31+
description = "my description"
32+
load_balancing_scheme = "INTERNAL_SELF_MANAGED"
33+
protocol = "HTTP"
34+
service_lb_policy = "//networkservices.googleapis.com/${google_network_services_service_lb_policies.{{$.PrimaryResourceId}}.id}"
35+
}

0 commit comments

Comments
 (0)