aws-ec2: support a name property for ec2.PublicSubnet/PrivateSubnet #26001
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
ec2.PrivateSubnet
andec2.PublicSubnet
don't have a prop likesubnetName
, even thoughec2.Vpc
has a propvpcName
.All these resources don't support providing a physical name, however,
ec2.Vpc
has a propvpcName
and use it to set theName
tag.Use Case
My customer hopes to set a
Name
tag for alsoec2.PrivateSubnet
andec2.PublicSubnet
with an easier way.Proposed Solution
Add a prop
subnetName
forec2.PrivateSubnet
andec2.PublicSubnet
, and provide it as aName
tag likeTags.of(subnet).add(SUBNETNAME_TAG, subnetName)
Other Information
No response
Acknowledgements
CDK version used
2.81.0
Environment details (OS name and version, etc.)
Amazon Linux 2
The text was updated successfully, but these errors were encountered: