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

(autoscaling): EbsDeviceVolumeType.IO2 is not a valid CloudFormation value #16027

Closed
jumic opened this issue Aug 12, 2021 · 7 comments · Fixed by #16028
Closed

(autoscaling): EbsDeviceVolumeType.IO2 is not a valid CloudFormation value #16027

jumic opened this issue Aug 12, 2021 · 7 comments · Fixed by #16028
Labels
@aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@jumic
Copy link
Contributor

jumic commented Aug 12, 2021

AWS::AutoScaling::LaunchConfiguration BlockDevice supports the following values for property VolumeType (see documentation):

Valid Values: standard | io1 | gp2 | st1 | sc1 | gp3

In CDK, values IO2 is also defined as a possible value in enum EbsDeviceVolumeType.

However, this value is not valid at the moment and should be removed.

Reproduction Steps

const vpc = ec2.Vpc.fromLookup(this, 'MyVPC', {
  isDefault: true,
})

new autoscaling.AutoScalingGroup(this, 'MyAutoScalingGroup', {
  blockDevices: [
    {
      deviceName: '/dev/sda1',
      volume: {
        ebsDevice: {
          deleteOnTermination: true,
          volumeType: autoscaling.EbsDeviceVolumeType.IO2,
        }
      },
    }
  ],
  vpc,
  instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.SMALL),
  machineImage: new ec2.AmazonLinuxImage(),
});

What did you expect to happen?

Deployment of AutoScalingGroup should be successfully.

What actually happened?

Deployment failed with error:

io2 is invalid. Valid volume types are: standard, io1, gp2, st1, sc1, gp3 (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError; Request ID: e5dd0928-b959-4e36-beed-91b7b2ba1f6a; Proxy: null)

Environment

  • **CDK CLI Version : 1.118.0
  • **Framework Version: 1.118.0
  • **Node.js Version: v14.16.0
  • **OS : macOS
  • **Language (Version): all

Other

Originally mentioned in issue #14685. I will submit a short PR and remove value IO2 as proposed for GP3 in the original issue.


This is 🐛 Bug Report

@jumic jumic added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 12, 2021
@github-actions github-actions bot added the @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling label Aug 12, 2021
@github-actions github-actions bot added the @aws-cdk/aws-cloudformation Related to AWS CloudFormation label Aug 12, 2021
@peterwoodworth
Copy link
Contributor

peterwoodworth commented Aug 12, 2021

Thanks for the submission! But this isn't something we want to do. The EBSDeviceVolumeType enum is also used for an EC2 Volume which does support io2

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@peterwoodworth
Copy link
Contributor

Looks like Neta didn't catch this when she labelled the gp3 issue as a p1, good thing no one ended up making a PR for that!

@jumic
Copy link
Contributor Author

jumic commented Aug 13, 2021

@peterwoodworth It's fine for me to keep this value. Maybe it will be added to Auto Scaling in the future, too.

There's one thing I want to mention if somebody has a look at this issue later:
In my opinion, it is possible to support different volume types in autoscaling and ec2. Enum EbsDeviceVolumeType exists twice in CDK, is available in autoscaling and ec2 as separate enums. Therefore, it should be possible to add a new volume type only in the module where it is supported.

@peterwoodworth
Copy link
Contributor

Thanks for pinging me about this @jumic, I didn't catch that there are two different enums. I'm looking back into the PR which merged the change right now, that PR was probably a mistake

@peterwoodworth
Copy link
Contributor

There's no mention in any of the original issues about Autoscaling, and Autoscaling has never supported io2. The PR seems to have just included the autoscaling enum as well even though autoscaling doesn't support io2

I wonder if the Autoscaling volume type lags behind the ec2 volume type. In other words, I wonder if io2 will be supported soon for Autoscaling like gp3 was.

For now, I can confirm your PR is safe to merge. I'll look into if io2 will be an option for autoscaling and if I can't find anything about that I will go ahead and merge your change :)

@peterwoodworth peterwoodworth removed @aws-cdk/aws-cloudformation Related to AWS CloudFormation needs-triage This issue or PR still needs to be triaged. labels Aug 13, 2021
@peterwoodworth peterwoodworth added the effort/small Small work item – less than a day of effort label Aug 13, 2021
@rix0rrr rix0rrr added the p2 label Aug 19, 2021
@rix0rrr rix0rrr removed their assignment Aug 19, 2021
@mergify mergify bot closed this as completed in #16028 Sep 7, 2021
mergify bot pushed a commit that referenced this issue Sep 7, 2021
…on value (#16028)

Remove value IO2 from enum EbsDeviceVolumeType because it is not supported in CloudFormation.

Fixes #16027.

Please double-check before approving: Value from enum is removed which could potentially be a breaking change. However, it's an invalid value. Therefore, it should be correct to remove it.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Sep 7, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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 bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants