Skip to content

Commit 26da247

Browse files
jlporterBBBmau
authored andcommitted
Ip address selection policy (GoogleCloudPlatform#11957)
1 parent 0909eca commit 26da247

File tree

4 files changed

+48
-0
lines changed

4 files changed

+48
-0
lines changed

mmv1/products/compute/BackendService.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ examples:
123123
vars:
124124
backend_service_name: 'backend-service'
125125
health_check_name: 'health-check'
126+
- name: 'backend_service_ip_address_selection_policy'
127+
primary_resource_id: 'default'
128+
vars:
129+
backend_service_name: 'backend-service'
126130
parameters:
127131
properties:
128132
- name: 'affinityCookieTtlSec'
@@ -772,6 +776,14 @@ properties:
772776
OAuth2 Client Secret SHA-256 for IAP
773777
sensitive: true
774778
output: true
779+
- name: 'ipAddressSelectionPolicy'
780+
type: Enum
781+
description: |
782+
Specifies preference of traffic to the backend (from the proxy and from the client for proxyless gRPC).
783+
enum_values:
784+
- 'IPV4_ONLY'
785+
- 'PREFER_IPV6'
786+
- 'IPV6_ONLY'
775787
- name: 'loadBalancingScheme'
776788
type: Enum
777789
description: |

mmv1/products/compute/RegionBackendService.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ examples:
115115
vars:
116116
region_backend_service_name: 'region-service'
117117
health_check_name: 'rbs-health-check'
118+
- name: 'region_backend_service_ip_address_selection_policy'
119+
primary_resource_id: 'default'
120+
vars:
121+
region_backend_service_name: 'region-service'
122+
health_check_name: 'rbs-health-check'
118123
parameters:
119124
- name: 'region'
120125
type: ResourceRef
@@ -777,6 +782,14 @@ properties:
777782
OAuth2 Client Secret SHA-256 for IAP
778783
sensitive: true
779784
output: true
785+
- name: 'ipAddressSelectionPolicy'
786+
type: Enum
787+
description: |
788+
Specifies preference of traffic to the backend (from the proxy and from the client for proxyless gRPC).
789+
enum_values:
790+
- 'IPV4_ONLY'
791+
- 'PREFER_IPV6'
792+
- 'IPV6_ONLY'
780793
- name: 'loadBalancingScheme'
781794
type: Enum
782795
description: |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
2+
name = "{{index $.Vars "backend_service_name"}}"
3+
load_balancing_scheme = "EXTERNAL_MANAGED"
4+
ip_address_selection_policy = "IPV6_ONLY"
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
resource "google_compute_region_backend_service" "{{$.PrimaryResourceId}}" {
2+
name = "{{index $.Vars "region_backend_service_name"}}"
3+
region = "us-central1"
4+
health_checks = [google_compute_region_health_check.health_check.id]
5+
6+
load_balancing_scheme = "EXTERNAL_MANAGED"
7+
protocol = "HTTP"
8+
ip_address_selection_policy = "IPV6_ONLY"
9+
}
10+
11+
resource "google_compute_region_health_check" "health_check" {
12+
name = "{{index $.Vars "health_check_name"}}"
13+
region = "us-central1"
14+
15+
tcp_health_check {
16+
port = 80
17+
}
18+
}

0 commit comments

Comments
 (0)