Skip to content

Commit

Permalink
fix(elbv2): correct wrong timeout validation (aws#26031)
Browse files Browse the repository at this point in the history
Following the update of Network Load Balancer (NLB) in November 2022, the range for setting HealthCheckTimeoutSeconds for NLB is now between 2 and 120 seconds. However, the CDK has yet to be updated to reflect this change.

https://aws.amazon.com/about-aws/whats-new/2022/11/elastic-load-balancing-capabilities-application-availability/
https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html

This PR addresses this by modifying the validation, enabling us to set the HealthCheckTimeoutSeconds for the NLB.

I have modified and added the following validation in this PR:
- Ensure that the HealthCheckTimeoutSeconds is between 2 and 120.
- Ensure that HealthCheckTimeoutSeconds is not greater than HealthCheckIntervalSeconds.


Closes aws#26023.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
tmyoda authored and lukey-aleios committed Jun 30, 2023
1 parent 95a23bf commit b892591
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 75 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "30.0.0",
"version": "32.0.0",
"files": {
"c7b59451188880618122593d9b5f98c0e30ff60bb10bb205c4c1a053fcdc4e79": {
"f0098723de290154f3b872be9dd8aeaeab44a56c1ef1162fdfe3105a68a2158c": {
"source": {
"path": "aws-cdk-elbv2-integ.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "c7b59451188880618122593d9b5f98c0e30ff60bb10bb205c4c1a053fcdc4e79.json",
"objectKey": "f0098723de290154f3b872be9dd8aeaeab44a56c1ef1162fdfe3105a68a2158c.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@
"Properties": {
"HealthCheckIntervalSeconds": 250,
"HealthCheckProtocol": "TCP",
"HealthCheckTimeoutSeconds": 100,
"Port": 443,
"Protocol": "TCP",
"Targets": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"30.0.0"}
{"version":"32.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "30.0.0",
"version": "32.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "30.0.0",
"version": "32.0.0",
"testCases": {
"elbv2-integ/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "30.0.0",
"version": "32.0.0",
"artifacts": {
"aws-cdk-elbv2-integ.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/c7b59451188880618122593d9b5f98c0e30ff60bb10bb205c4c1a053fcdc4e79.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f0098723de290154f3b872be9dd8aeaeab44a56c1ef1162fdfe3105a68a2158c.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Loading

0 comments on commit b892591

Please sign in to comment.