Skip to content

aws_elasticloadbalancingv2: Incorrect statement that NLB health check healthy/unhealthy counts need to be the same #32365

@vcschapp

Description

@vcschapp

Describe the issue

The documentation for the unhealthyThresholdCount member of the ELBv2 HealthCheck interface says that for NLBs the unhealthy threshold count must be the same as the healthy threshold count:

unhealthyThresholdCount?

Type: number (optional, default: 2)

The number of consecutive health check failures required before considering a target unhealthy.

For Application Load Balancers, the default is 2. For Network Load Balancers, this value must be the same as the healthy threshold count.

This does not appear to be accurate.

  • When I create an NLB target group manually in the AWS EC2 console and configure the health check manually, I can set the healthy/unhealthy counts to different values.
  • There is no reference to this limitation in the CloudFormation documentation for AWS::ElasticLoadBalancingV2::TargetGroup or any of its member attributes.
  • There is no attempt to validate this constraint in the CDK TypeScript code.

image

Links

  1. Impacted CDK documentation page: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.HealthCheck.html#unhealthythresholdcount
  2. Documentation source in GitHub. https://github.com/aws/aws-cdk/blob/v2.170.0/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/shared/base-target-group.ts#L135-L136
  3. Relevant CloudFormation documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-unhealthythresholdcount

CDK Version

Last checked in documentation for v2.170.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-elasticloadbalancingv2Related to Amazon Elastic Load Balancing V2documentationThis is a problem with documentation.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions