Skip to content

Commit

Permalink
fix(globalaccelerator-endpoints): add preserveClientIp option for net…
Browse files Browse the repository at this point in the history
…work loadbalancer

### Issue # (if applicable)

### Reason for this change

preserveClientIp was missing for GlobalAccelerator Endpoints when using a network loadbalancer.

### Description of changes

* add missing network load balancer endpoint prop.

### Description of how you validated changes

Added integration tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Sascha committed Jun 12, 2024
1 parent f4a4607 commit be3c0fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,18 @@
}
},
{
"ClientIPPreservationEnabled": true,
"EndpointId": {
"Ref": "ALBAEE750D2"
}
},
{
"EndpointId": {
"Ref": "NLB55158F82"
}
},
{
"ClientIPPreservationEnabled": true,
"EndpointId": {
"Ref": "NLB55158F82"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class GaStack extends Stack {
listener,
endpoints: [
new endpoints.ApplicationLoadBalancerEndpoint(alb),
new endpoints.ApplicationLoadBalancerEndpoint(alb, { preserveClientIp: true }),
new endpoints.NetworkLoadBalancerEndpoint(nlb),
new endpoints.NetworkLoadBalancerEndpoint(nlb, { preserveClientIp: true }),
new endpoints.CfnEipEndpoint(eip),
new endpoints.InstanceEndpoint(instances[0]),
new endpoints.InstanceEndpoint(instances[1]),
Expand Down

0 comments on commit be3c0fd

Please sign in to comment.