Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ip address selection policy #11957

Merged
merged 17 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c204359
Add ipAddressSelectionPolicy to BackendService.yaml
jlporter Oct 9, 2024
81236e8
add ipAddressSelectionPolicy to RegionBackendService.yaml
jlporter Oct 9, 2024
12b8bbb
Create backend_service_ip_address_selection_policy.tf.tmpl
jlporter Oct 9, 2024
11a20c5
Create region_backend_service_ip_address_selection_policy.tf.tmpl
jlporter Oct 9, 2024
a2709d8
Use google-beta provider in backend_service_ip_address_selection_poli…
jlporter Oct 9, 2024
0942b4f
Use EXTERNAL_MANAGED LB scheme in backend_service_ip_address_selectio…
jlporter Oct 9, 2024
28182ae
Remove default_value from ipAddressSelectionPolicy in BackendService.…
jlporter Oct 9, 2024
93cd418
Remove default_value from ipAddressSelectionPolicy in RegionBackendSe…
jlporter Oct 9, 2024
3a15b83
Remove min_version from ipAddressSelectionPolicy in BackendService.ya…
jlporter Oct 11, 2024
85483d8
Remove min_version for IpAddressSelectionPolicy in RegionBackendServi…
jlporter Oct 11, 2024
0152299
Remove provider=google_beta, this should be available in v1 now.
jlporter Oct 11, 2024
4ec4cd9
Remove provider=google_beta, this should be available in v1 now.
jlporter Oct 11, 2024
6d86306
Add example to BackendService.yaml
jlporter Oct 15, 2024
42f9f57
Add example to RegionBackendService.yaml
jlporter Oct 15, 2024
ec502ef
Fix health check in region_backend_service_ip_address_selection_polic…
jlporter Oct 15, 2024
ba18542
Fix health check in ip_address_selection example in RegionBackendServ…
jlporter Oct 15, 2024
67c3cbb
Fix resource name in region_backend_service_ip_address_selection_poli…
jlporter Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -771,6 +775,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 @@ -776,6 +781,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}}" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't seen these examples being picked up anywhere (to be used in the docs and/or tests). Did you perhaps forget to add examples blocks in the yaml files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, indeed, they should be added now.

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
}
}