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

aws-ec2: support a name property for ec2.PublicSubnet/PrivateSubnet #26001

Closed
1 of 2 tasks
ymhiroki opened this issue Jun 16, 2023 · 3 comments
Closed
1 of 2 tasks

aws-ec2: support a name property for ec2.PublicSubnet/PrivateSubnet #26001

ymhiroki opened this issue Jun 16, 2023 · 3 comments
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

Comments

@ymhiroki
Copy link
Contributor

ymhiroki commented Jun 16, 2023

Describe the feature

ec2.PrivateSubnet and ec2.PublicSubnet don't have a prop like subnetName, even though ec2.Vpc has a prop vpcName.

All these resources don't support providing a physical name, however, ec2.Vpc has a prop vpcName and use it to set the Name tag.

Use Case

My customer hopes to set a Name tag for also ec2.PrivateSubnet and ec2.PublicSubnet with an easier way.

Proposed Solution

Add a prop subnetName for ec2.PrivateSubnet and ec2.PublicSubnet, and provide it as a Name tag like Tags.of(subnet).add(SUBNETNAME_TAG, subnetName)

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.81.0

Environment details (OS name and version, etc.)

Amazon Linux 2

@ymhiroki ymhiroki added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 16, 2023
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Jun 16, 2023
@pahud
Copy link
Contributor

pahud commented Jun 16, 2023

This sounds like a very interesting idea. Thank you.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jun 16, 2023
@peterwoodworth
Copy link
Contributor

Subnet names are applied through tags, you should simply add a tag with the key Name to your subnet to name it. There's no option to supply a name through CloudFormation

Ping me if this doesn't work

@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-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
Projects
None yet
Development

No branches or pull requests

3 participants