-
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
fix(elasticloadbalancingv2): Incorrect validation on NetworkLoadBalancer.configureHealthCheck()
#16445
Conversation
… to target-group validate() method
@njlynch Anything I can do to help get this through? |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…ncer.configureHealthCheck()` (aws#16445) ## Summary The [`NetworkLoadBalancer`'s](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.NetworkLoadBalancer.html) [`configureHealthCheck()`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticloadbalancingv2.ApplicationTargetGroup.html#configurewbrhealthwbrcheckhealthcheck) method is incorrectly throwing a validation error when provided a valid `protocol` and the same value for both `interval` and `timeout`. ```sh Error: Healthcheck interval 10 seconds must be greater than the timeout 10 seconds ``` This rule only applies to Application Load Balancers and not Network Load Balancers. This PR: - Moves the mentioned validation logic from the `BaseTargetGroup` class to the `ApplicationTargetGroup` class. - Adds tests that check a validation error is thrown when **invalid** `protocol`, `interval`, `timeout`, & `path` combinations are provided for the respected TargetGroup type. - Adds tests that check a validation error is **not** thrown when **valid** `protocol`, `interval`, `timeout`, & `path` combinations are provided for the respected TargetGroup type. Provides fix for SIM ticket: V427669955 Fixes issue: aws#16446 Refs: - [The mentioned validation logic was implemented by this PR.](aws#16107) - [CreateTargetGroup CloudFormation docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html) - [Application Load Balancer's Health check configuration docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html) - [Network Load Balancer's Health check configuration docs](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Summary
The
NetworkLoadBalancer
'sconfigureHealthCheck()
method is incorrectly throwing a validation error when provided a validprotocol
and the same value for bothinterval
andtimeout
.This rule only applies to Application Load Balancers and not Network Load Balancers.
This PR:
BaseTargetGroup
class to theApplicationTargetGroup
class.protocol
,interval
,timeout
, &path
combinations are provided for the respected TargetGroup type.protocol
,interval
,timeout
, &path
combinations are provided for the respected TargetGroup type.Provides fix for SIM ticket: V427669955
Fixes issue: #16446
Refs:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license