Skip to content

Commit

Permalink
docs(autoscaling): correct feature flag for launch templates (#27235)
Browse files Browse the repository at this point in the history
The docs for [`AutoScalingGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_autoscaling-readme.html#auto-scaling-group) mention using the feature flag `@aws-cdk/aws-autoscaling:disableDefaultLaunchConfigCreation` in order to generate launch templates instead of launch configs.

This flag doesn't exist and the correct flag should be `@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig` as specified on the [feature flags page](https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk/cx-api/FEATURE_FLAGS.md#aws-cdkaws-autoscalinggeneratelaunchtemplateinsteadoflaunchconfig)

_Was raised by Carl Fürstenberg on the #aws-cdk  slack channel_

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
iRoachie authored Sep 21, 2023
1 parent abf21c9 commit 2a9f5b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-autoscaling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ new autoscaling.AutoScalingGroup(this, 'ASG', {
});
```

Creating an `AutoScalingGroup` from a Launch Configuration has been deprecated. All new accounts created after December 31, 2023 will no longer be able to create Launch Configurations. With the `@aws-cdk/aws-autoscaling:disableDefaultLaunchConfigCreation` feature flag set to true, `AutoScalingGroup` properties used to create a Launch Configuration will now be used to create a `LaunchTemplate` using a [Launch Configuration to `LaunchTemplate` mapping](https://docs.aws.amazon.com/autoscaling/ec2/userguide/migrate-launch-configurations-with-cloudformation.html#launch-configuration-mapping-reference). Specifically, the following `AutoScalingGroup` properties will be used to generate a `LaunchTemplate`:
Creating an `AutoScalingGroup` from a Launch Configuration has been deprecated. All new accounts created after December 31, 2023 will no longer be able to create Launch Configurations. With the `@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig` feature flag set to true, `AutoScalingGroup` properties used to create a Launch Configuration will now be used to create a `LaunchTemplate` using a [Launch Configuration to `LaunchTemplate` mapping](https://docs.aws.amazon.com/autoscaling/ec2/userguide/migrate-launch-configurations-with-cloudformation.html#launch-configuration-mapping-reference). Specifically, the following `AutoScalingGroup` properties will be used to generate a `LaunchTemplate`:
* machineImage
* keyName
* instanceType
Expand Down

0 comments on commit 2a9f5b5

Please sign in to comment.