Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoScalingGroup construct doesn't allow to set autoScalingGroupName #5593

Closed
2 of 5 tasks
kadishmal opened this issue Dec 31, 2019 · 0 comments Β· Fixed by #8853
Closed
2 of 5 tasks

AutoScalingGroup construct doesn't allow to set autoScalingGroupName #5593

kadishmal opened this issue Dec 31, 2019 · 0 comments Β· Fixed by #8853
Assignees
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling effort/small Small work item – less than a day of effort feature-request A feature should be added or improved.

Comments

@kadishmal
Copy link

kadishmal commented Dec 31, 2019

  • I'm submitting a ...
    • πŸͺ² bug report
    • πŸš€ feature request
    • πŸ“š construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.

AutoScalingGroup construct doesn't allow to set autoScalingGroupName. It is a vital part of our infrastructure to give specific names which are used by our integration tests.

The underlying CFN resource supports setting the name https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html.

At the moment I have to do the following:

import { AutoScalingGroup, CfnAutoScalingGroup } from '@aws-cdk/aws-autoscaling';
import { AmazonLinuxImage, InstanceClass, InstanceSize, InstanceType, Vpc } from '@aws-cdk/aws-ec2';

const asgName = 'my-asg-name';
const asg = new AutoScalingGroup(this, asgName, {
    instanceType: InstanceType.of(InstanceClass.BURSTABLE2, InstanceSize.NANO),
    desiredCapacity: 3,
    machineImage: new AmazonLinuxImage(),
    maxCapacity: 10,
    minCapacity: 3,
    vpc: Vpc.fromLookup(this, 'default-vpc', {
        isDefault: true
    })
});

const realASG: CfnAutoScalingGroup = (asg as any).autoScalingGroup as CfnAutoScalingGroup;

realASG.addPropertyOverride('AutoScalingGroupName', asgName);

Environment

  • CDK CLI Version: 1.18.0
  • Module Version: 1.18.0
  • OS: OSX Mojave
  • Language: TypeScript
@SomayaB SomayaB added feature-request A feature should be added or improved. @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling labels Dec 31, 2019
@rix0rrr rix0rrr assigned NetaNir and unassigned rix0rrr Jan 23, 2020
@NetaNir NetaNir added the effort/small Small work item – less than a day of effort label Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling effort/small Small work item – less than a day of effort feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants