-
Notifications
You must be signed in to change notification settings - Fork 4.4k
(ec2): volumeName doesn't set name of volume #15831
Description
When creating an L2 EC2 Volume, you can supposedly change the physical name of the resource with the property volumeName. In the code, the only place where the prop volumeName is used is here inputted as the physicalName prop in super()
physicalName is never used anywhere. Here is where the CfnVolume is created. Cloudformation volumes don't have a property that sets the physical name of the volume, so setting the name through a tag would be the way to set the physical name of a volume through the CDK.
Currently the volumeName property does nothing on the L2 Volume construct. adding a tag to the CfnVolume like so is my proposed solution to this problem:
add a line below the creation of the CfnVolume called resource linked above
Tags.of(resource).add('Name', props.volumeName) // or this.physicalNameThis is 🐛 Bug Report