Skip to content

(ec2): volumeName doesn't set name of volume #15831

@peterwoodworth

Description

@peterwoodworth

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

This is 🐛 Bug Report

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.effort/smallSmall work item – less than a day of effort

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions