Skip to content

aws-autoscaling: specify multiple health check types including EBS and VPC_LATTICE types #31289

@go-to-k

Description

@go-to-k

Describe the feature

Only ONE HealthCheckType can be selected for the healthCheck property now: EC2 or ELB.

https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts#L233

https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts#L2232-L2258

However, the current CFn specification allows multiple health check types to be specified, separated by commas.

A comma-separated value string of one or more health check types.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html#cfn-autoscaling-autoscalinggroup-healthchecktype

So we should be able to specify multiple health check types in the healthCheck property in props.

Use Case

By default, EC2 health check is enabled, but it can be very beneficial to include other health checks such as EBS and ELB.

Proposed Solution

Add a new property for multiple health check types.

Other Information

Also, besides EC2 and ELB, EBS and VPC_LATTICE can now be configured.

The valid values are EC2, EBS, ELB, and VPC_LATTICE. EC2 is the default health check and cannot be disabled.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html#cfn-autoscaling-autoscalinggroup-healthchecktype

If it was just EC2 and ELB, there would not be a need for multiple specifications. (Because specifying EC2 and another type at the same time would result in a CFn error. This means that when specifying an ELB, it is a single specification.)

But the increase in the number of these property types makes multiple specifications necessary. Therefore, it is good to support the specification of multiple health check types and the addition of new types at the same time.

See the docs for more details.

https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.155.0

Environment details (OS name and version, etc.)

MacOS 13.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-autoscalingRelated to Amazon EC2 Auto Scalingeffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions