Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(autoscaling): add new
HealthChecks
for multiple health check t…
…ypes, including EBS and VPC_LATTICE types (aws#31286) ### Issue # (if applicable) Closes aws#31289 . ### Reason for this change Only ONE HealthCheckType can be selected for an existing healthCheck property: 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 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](aws#31286 (comment)). **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 ### Description of changes So, I add a new `HealthChecks` class and `healthChecks` property. - One or more health check types can be selected. - Added EBS and VPC_LATTIC types. And I deprecated the existing `healthCheck` property. ### Description of how you validated changes Unit and integ tests. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information