-
Notifications
You must be signed in to change notification settings - Fork 4k
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(elbv2): support UDP
and TCP_UDP
protocols
#4390
Conversation
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
I preferred creating a new Another consistency change we could do would be to rename EDIT: A better thing would have been to |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@@ -26,7 +26,7 @@ export interface BaseNetworkListenerProps { | |||
* | |||
* @default - TLS if certificates are provided. TCP otherwise. | |||
*/ | |||
readonly protocol?: Protocol; | |||
readonly protocol?: NetworkProtocol; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but we can't have this. I don't think this is a good enough reason to break API compatibility.
I would be more in favor of adding TCP_UDP
to the existing Protocol
enum, noting in the docstring that it is only for NLBs, and adding runtime validation to make sure it isn't being used for ALBs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem! That what I did first, but I saw the lack of consistency with ALB and went for the breaking change. I'll update it.
@@ -215,7 +215,7 @@ export = { | |||
port: 443, | |||
protocol: elbv2.Protocol.TLS, | |||
defaultTargetGroups: [new elbv2.NetworkTargetGroup(stack, 'Group', { vpc, port: 80 })] | |||
}), Error, '/When the protocol is set to TLS, you must specify certificates/'); | |||
}), /When the protocol is set to TLS, you must specify certificates/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When changing Invalid Protocol listener
test, I noticed the error message wasn't actually checked. I fixed the next two tests as well
Just noticed I messed up something, I'll fix it and reopen, sorry |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@@ -106,8 +106,8 @@ export class NetworkTargetGroup extends TargetGroupBase implements INetworkTarge | |||
if (healthCheck.path) { | |||
ret.push('Health check paths are not supported for Network Load Balancer health checks'); | |||
} | |||
if (healthCheck.protocol && healthCheck.protocol !== Protocol.TCP && healthCheck.protocol !== Protocol.TLS) { | |||
ret.push(`Health check protocol '${healthCheck.protocol}' is not supported. Must be one of [TCP, TLS]`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't the case according to the docs the docs:
HealthCheckProtocol
The possible protocols are HTTP, HTTPS, and TCP
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request is now being automatically merged. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
1 similar comment
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Adds support for
UDP
andTCP_UDP
protocol for NLB and health checksUDP
andTCP_UDP
toProtocol
Protocol
to indicate thatHTTP
andHTTPS
cannot be used for NLBTLS|TCP
, nowHTTP|HTTPS|TCP
)References:
Fixes #4341
Fixes #3107
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license