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

feat(elasticloadbalancingv2): denyAllIgwTraffic and clientRoutingPolicy for NLB #29521

Merged
merged 11 commits into from Mar 19, 2024

Conversation

badmintoncryer
Copy link
Contributor

Issue # (if applicable)

Closes #29520.

Reason for this change

NLB supports ipv6.deny_all_igw_traffic and dns_record.client_routing_policy but these are not configurable from AWS CDK.

Description of changes

  • add zonalAffinity props to NetworkLoadBalancerProps
  • add denyAllIgwTraffic props to BaseLoadBalancerProps
    • ipv6.deny_all_igw_traffic is also supported by ALB

Description of how you validated changes

I've added both unit and integ tests.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team March 17, 2024 02:21
@github-actions github-actions bot added feature-request A feature should be added or improved. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK labels Mar 17, 2024
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@badmintoncryer badmintoncryer changed the title feat(elasticloadbalancingv2): nlb attributes feat(elasticloadbalancingv2): denyAlligwTraffic and clientRoutingPolicy for NLB Mar 17, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review March 17, 2024 06:42

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@badmintoncryer badmintoncryer marked this pull request as ready for review March 17, 2024 08:45
@badmintoncryer badmintoncryer changed the title feat(elasticloadbalancingv2): denyAlligwTraffic and clientRoutingPolicy for NLB feat(elasticloadbalancingv2): denyAllIgwTraffic and clientRoutingPolicy for NLB Mar 17, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 17, 2024
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍 Just a minor note

@@ -119,6 +119,7 @@ export class ApplicationLoadBalancer extends BaseLoadBalancer implements IApplic
if (props.idleTimeout !== undefined) { this.setAttribute('idle_timeout.timeout_seconds', props.idleTimeout.toSeconds().toString()); }
if (props.dropInvalidHeaderFields) {this.setAttribute('routing.http.drop_invalid_header_fields.enabled', 'true'); }
if (props.desyncMitigationMode !== undefined) {this.setAttribute('routing.http.desync_mitigation_mode', props.desyncMitigationMode); }
if (props.deletionProtection !== undefined) { this.setAttribute('deletion_protection.enabled', props.deletionProtection.toString()); }
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems redundant 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops..
I have removed this line. Thanks!

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Mar 17, 2024
GavinZZ
GavinZZ previously approved these changes Mar 18, 2024
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Love it, thanks!

@@ -193,7 +193,7 @@ If you do not provide any options for this method, it redirects HTTP port 80 to
By default all ingress traffic will be allowed on the source port. If you want to be more selective with your
ingress rules then set `open: false` and use the listener's `connections` object to selectively grant access to the listener.

### Load Balancer attributes
### Application Load Balancer attributes
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, thanks for updating the name and make it clear to separate ALB vs NLB.

Copy link
Contributor

mergify bot commented Mar 18, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 18, 2024
Copy link
Contributor

mergify bot commented Mar 18, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@badmintoncryer
Copy link
Contributor Author

@GavinZZ Thank you for your review!
Mergify job seems to be failed. Could you please resolve it?

@mergify mergify bot dismissed GavinZZ’s stale review March 19, 2024 21:49

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 2f4d6e1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@GavinZZ GavinZZ merged commit 7fe8ad3 into aws:main Mar 19, 2024
9 checks passed
@badmintoncryer badmintoncryer deleted the nlbAttributes branch March 19, 2024 23:04
ahammond pushed a commit to ahammond/aws-cdk that referenced this pull request Mar 26, 2024
…olicy` for NLB (aws#29521)

### Issue # (if applicable)

Closes aws#29520.

### Reason for this change

NLB supports `ipv6.deny_all_igw_traffic` and
`dns_record.client_routing_policy` but these are not configurable from
AWS CDK.

### Description of changes

- add `zonalAffinity` props to `NetworkLoadBalancerProps`
- add `denyAllIgwTraffic` props to `BaseLoadBalancerProps`
  - `ipv6.deny_all_igw_traffic` is also supported by ALB

### Description of how you validated changes

I've added both unit and integ 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*

---------

Co-authored-by: GZ <yuanhaoz@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

elasticloadbalancingv2: support NLB attributes
4 participants