-
Notifications
You must be signed in to change notification settings - Fork 4.5k
autoscaling: EbsDeviceVolumeType.GP3 is not a valid CloudFormation value #14685
Description
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