-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-autoscalingRelated to Amazon EC2 Auto ScalingRelated to Amazon EC2 Auto Scalingeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
I'd like to be able to configure the termination policies on an AutoScalingGroup.
Use Case
I'm currently using the L2 AutoScalingGroup construct. I can configure the termination policies with the L1 CfnAutoScalingGroup via the terminationPolicies prop, but I'd like to avoid falling back to the L1 construct if possible.
Proposed Solution
The solution could look as simple as this:
import * as autoscaling from '@aws-cdk/aws-autoscaling';
new autoscaling.AutoScalingGroup(this, 'ASG', {
// ...
terminationPolicies: ["ClosestToNextInstanceHour"],
};For symmetry with other pieces of the CDK, the policies could be represented as an enum:
import * as autoscaling from '@aws-cdk/aws-autoscaling';
new autoscaling.AutoScalingGroup(this, 'ASG', {
// ...
terminationPolicies: [autoscaling.TerminationPolicy.CLOSEST_TO_NEXT_INSTANCE_HOUR],
};Other
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-autoscalingRelated to Amazon EC2 Auto ScalingRelated to Amazon EC2 Auto Scalingeffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2