Skip to content

Commit

Permalink
Ip address selection policy (GoogleCloudPlatform#11957)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlporter authored and BBBmau committed Oct 23, 2024
1 parent d032fde commit 90f470d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mmv1/products/compute/BackendService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ examples:
vars:
backend_service_name: 'backend-service'
health_check_name: 'health-check'
- name: 'backend_service_ip_address_selection_policy'
primary_resource_id: 'default'
vars:
backend_service_name: 'backend-service'
parameters:
properties:
- name: 'affinityCookieTtlSec'
Expand Down Expand Up @@ -772,6 +776,14 @@ properties:
OAuth2 Client Secret SHA-256 for IAP
sensitive: true
output: true
- name: 'ipAddressSelectionPolicy'
type: Enum
description: |
Specifies preference of traffic to the backend (from the proxy and from the client for proxyless gRPC).
enum_values:
- 'IPV4_ONLY'
- 'PREFER_IPV6'
- 'IPV6_ONLY'
- name: 'loadBalancingScheme'
type: Enum
description: |
Expand Down
13 changes: 13 additions & 0 deletions mmv1/products/compute/RegionBackendService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ examples:
vars:
region_backend_service_name: 'region-service'
health_check_name: 'rbs-health-check'
- name: 'region_backend_service_ip_address_selection_policy'
primary_resource_id: 'default'
vars:
region_backend_service_name: 'region-service'
health_check_name: 'rbs-health-check'
parameters:
- name: 'region'
type: ResourceRef
Expand Down Expand Up @@ -777,6 +782,14 @@ properties:
OAuth2 Client Secret SHA-256 for IAP
sensitive: true
output: true
- name: 'ipAddressSelectionPolicy'
type: Enum
description: |
Specifies preference of traffic to the backend (from the proxy and from the client for proxyless gRPC).
enum_values:
- 'IPV4_ONLY'
- 'PREFER_IPV6'
- 'IPV6_ONLY'
- name: 'loadBalancingScheme'
type: Enum
description: |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
name = "{{index $.Vars "backend_service_name"}}"
load_balancing_scheme = "EXTERNAL_MANAGED"
ip_address_selection_policy = "IPV6_ONLY"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
resource "google_compute_region_backend_service" "{{$.PrimaryResourceId}}" {
name = "{{index $.Vars "region_backend_service_name"}}"
region = "us-central1"
health_checks = [google_compute_region_health_check.health_check.id]

load_balancing_scheme = "EXTERNAL_MANAGED"
protocol = "HTTP"
ip_address_selection_policy = "IPV6_ONLY"
}

resource "google_compute_region_health_check" "health_check" {
name = "{{index $.Vars "health_check_name"}}"
region = "us-central1"

tcp_health_check {
port = 80
}
}

0 comments on commit 90f470d

Please sign in to comment.