From 2abf3ae0efbbbe5a2c427d2abe25cd756c3f31b6 Mon Sep 17 00:00:00 2001 From: Braden Bassingthwaite Date: Tue, 11 Jun 2024 12:20:56 -0600 Subject: [PATCH] Add ProxyProtocol to LoadBalancer HealthCheck (#700) This will allow customers to enable/disable PROXY protocol on their health checks. If no value is provided then it will default to the LBs PROXY protocol config. --- load_balancers.go | 1 + load_balancers_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/load_balancers.go b/load_balancers.go index 703aa842..a24952b7 100644 --- a/load_balancers.go +++ b/load_balancers.go @@ -170,6 +170,7 @@ type HealthCheck struct { ResponseTimeoutSeconds int `json:"response_timeout_seconds,omitempty"` HealthyThreshold int `json:"healthy_threshold,omitempty"` UnhealthyThreshold int `json:"unhealthy_threshold,omitempty"` + ProxyProtocol *bool `json:"proxy_protocol,omitempty"` } // String creates a human-readable description of a HealthCheck. diff --git a/load_balancers_test.go b/load_balancers_test.go index 9b6aa0f0..10dc2f97 100644 --- a/load_balancers_test.go +++ b/load_balancers_test.go @@ -1181,6 +1181,7 @@ func TestLoadBalancers_AsRequest(t *testing.T) { ResponseTimeoutSeconds: 10, HealthyThreshold: 3, UnhealthyThreshold: 3, + ProxyProtocol: PtrTo(true), }, StickySessions: &StickySessions{ Type: "cookies", @@ -1242,6 +1243,7 @@ func TestLoadBalancers_AsRequest(t *testing.T) { ResponseTimeoutSeconds: 10, HealthyThreshold: 3, UnhealthyThreshold: 3, + ProxyProtocol: PtrTo(true), }, StickySessions: &StickySessions{ Type: "cookies",