forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(elasticloadbalancingv2): Incorrect validation on `NetworkLoadBala…
…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*
- Loading branch information
Showing
4 changed files
with
413 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.