Skip to content

aws-elasticloadbalancingv2: health and unhealthy threshold counts can vary #26941

@toxygene

Description

@toxygene

The validateTargetGroup method in the NetworkTargetGroup class has a check to ensure the healthy and unhealthy threshold counts are the same (https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts#L262-L268), but this does not appear to be a requirement of AWS.

➜  aws elbv2 describe-target-groups --target-group-arns [omitted] --query 'TargetGroups[0].[HealthyThresholdCount,UnhealthyThresholdCount]'
[
    5,
    5
]

Expected Behavior

The NetworkTargetGroup is created

Current Behavior

An error message of Healthy and Unhealthy Threshold Counts must be the same.

Reproduction Steps

Create a NetworkTargetGroup with differing healthy and unhealthy threshold counts.

Possible Solution

Remove https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/nlb/network-target-group.ts#L262-L268

Additional Information/Context

No response

CDK CLI Version

2.91.0

Framework Version

No response

Node.js Version

18.17.1

OS

macOS 13.5.1

Language

Python

Language Version

3.9.16

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-elasticloadbalancingv2Related to Amazon Elastic Load Balancing V2bugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions