Skip to content

(elbv2): NetworkTargetGroup is overly restrictive when setting healthCheckInterval #24156

@peterwoodworth

Description

@peterwoodworth

Describe the bug

NetworkTargetGroup only allows you to select 10 or 30 seconds for the health check interval. The allowed range is from 5 to 300.

Expected Behavior

I expect to be able to set the health check interval anywhere from 5 to 300 seconds

Current Behavior

I can only set the health check interval to be 10 or 30 seconds

Reproduction Steps

    const nlbService = new NetworkLoadBalancedFargateService(this, 'NlbFargatePattern', {
      taskDefinition,
    });

    nlbService.targetGroup.configureHealthCheck({
      interval: cdk.Duration.seconds(25)
    });

This will produce the following error message

Health check interval '25' not supported. Must be one of the following values '10,30'.

Possible Solution

Will submit PR

Additional Information/Context

No response

CDK CLI Version

2.64

Framework Version

No response

Node.js Version

16

OS

mac

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.effort/smallSmall work item – less than a day of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions