Skip to content

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

@jumic

Description

@jumic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-autoscalingRelated to Amazon EC2 Auto ScalingbugThis issue is a bug.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions