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.GP3 is not a valid CloudFormation value #14685

Closed
cmoore1776 opened this issue May 13, 2021 · 4 comments
Closed
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 good first issue Related to contributions. See CONTRIBUTING.md p1

Comments

@cmoore1776
Copy link
Contributor

The autoscaling.EbsDeviceVolumeType enum provides a value for GP3 which, when synthesized as the string value "gp3" is not a valid option in CloudFromation.

From AWS::AutoScaling::LaunchConfiguration BlockDevice documentation:

VolumeType

The volume type, which can be standard for Magnetic, io1 for Provisioned IOPS SSD, gp2 for General Purpose SSD, st1 for Throughput Optimized HDD, or sc1 for Cold HDD. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide for Linux Instances.

Valid values: standard | io1 | gp2 | st1 | sc1

Deploying CDK for an autoscaling.AutoScalingGroup resource referencing an autoscaling.BlockDevice with volume_type = autoscaling.EbsDeviceVolumeType.GP3 results in a deployment error:

gp3 is invalid. Valid volume types are standard, io1, gp2, st1 and sc1. (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError; Request ID: f2eb3af7-b53b-446d-9ad1-9ec09d520480; Proxy: null)

Reproduction Steps

autoscaling.AutoScalingGroup(
  [..]
  block_devices= [
    autoscaling.BlockDevice(
      device_name= "/dev/sda1",
      volume= autoscaling.BlockDeviceVolume.ebs(
        delete_on_termination= True,
        encrypted= True,
        volume_size= 500,
        volume_type= autoscaling.EbsDeviceVolumeType.GP3
      )
    )
  ]
)

What did you expect to happen?

Ideally, CloudFormation would add support for GP3 volumes, and nothing would need to change on the CDK side.

However, until that happens, CDK should not provide the option for GP3 volumes within the autoscaling.EbsDeviceVolumeType enum.

What actually happened?

The CDK above synthesizes to invalid CloudFormation:

"BlockDeviceMappings": [
  {
    "DeviceName": "/dev/sda1",
    "Ebs": {
      "DeleteOnTermination": true,
      "Encrypted": true,
      "VolumeSize": 500,
      "VolumeType": "gp3"
    }
  }
]

Environment

  • CDK CLI Version : 1.103.0 (build bc13a66)
  • Framework Version: 1.103.0
  • Node.js Version: v14.16.1
  • OS : macOS Big Sur 11.3.1
  • Language (Version): Python 3.9.5

This is 🐛 Bug Report

@cmoore1776 cmoore1776 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 13, 2021
@github-actions github-actions bot added @aws-cdk/aws-autoscaling Related to Amazon EC2 Auto Scaling @aws-cdk/aws-cloudformation Related to AWS CloudFormation labels May 13, 2021
@NetaNir NetaNir added p1 good first issue Related to contributions. See CONTRIBUTING.md effort/small Small work item – less than a day of effort and removed @aws-cdk/aws-cloudformation Related to AWS CloudFormation needs-triage This issue or PR still needs to be triaged. labels May 13, 2021
@wedge-jarrad
Copy link

Looks like CloudFormation has caught up and this bug is no longer a bug. GP3 is now a valid value.

IO2 is still invalid, but that's a different bug report.

@jumic
Copy link
Contributor

jumic commented Aug 12, 2021

@peterwoodworth I think this issue could be closed. GP3 is supported now.
For IO2, I created a follow-up issue (#16027).

@peterwoodworth
Copy link
Contributor

Thanks for the ping, closing because this is now supported

@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.

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 good first issue Related to contributions. See CONTRIBUTING.md p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants