Skip to content

chore(VpcV2): add default name tag for VPC and components#32360

Merged
mergify[bot] merged 7 commits intoaws:mainfrom
shikha372:tagging_vpc
Jan 7, 2025
Merged

chore(VpcV2): add default name tag for VPC and components#32360
mergify[bot] merged 7 commits intoaws:mainfrom
shikha372:tagging_vpc

Conversation

@shikha372
Copy link
Copy Markdown
Contributor

@shikha372 shikha372 commented Dec 2, 2024

Issue # (if applicable)

Closes RFC#507.
Tracking (#30762 )

Reason for this change

Added Name tag for VPC and related components.

Description of changes

Tag fields not supported in CFN schema for Route and Egress-only-IGW.

Description of how you validated changes

Added unit test and integration tests.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added the p2 label Dec 2, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team December 2, 2024 17:26
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Dec 2, 2024
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.52%. Comparing base (107eed3) to head (ae1e123).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32360   +/-   ##
=======================================
  Coverage   81.52%   81.52%           
=======================================
  Files         222      222           
  Lines       13715    13715           
  Branches     2417     2417           
=======================================
  Hits        11181    11181           
  Misses       2254     2254           
  Partials      280      280           
Flag Coverage Δ
suite.unit 81.52% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 80.97% <ø> (ø)
packages/aws-cdk-lib/core 82.09% <ø> (ø)

@shikha372 shikha372 changed the title (feat): add tagging for VPC and components feat(VpcV2): add tagging for VPC and components Dec 2, 2024
@shikha372 shikha372 changed the title feat(VpcV2): add tagging for VPC and components chore(VpcV2): add tagging for VPC and components Dec 3, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review December 3, 2024 17:54

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@shikha372 shikha372 marked this pull request as ready for review December 4, 2024 04:21
Copy link
Copy Markdown
Contributor

@gracelu0 gracelu0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @shikha372 ! Should we add a README section for this?

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 12, 2024
Copy link
Copy Markdown
Member

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help me understand why do we need to provide default taggings when creating the constructs?


//Add tags to the IPAM Pool if name is provided
if (props.ipamPoolName) {
Tags.of(this).add(NAME_TAG, props.ipamPoolName);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if users want to add a custom tag that also called this name?

Copy link
Copy Markdown
Contributor Author

@shikha372 shikha372 Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is added according to the resource name provided, even if they want to add NAME tag i wonder they would like it to rename it to some other value than the actual name of the resource.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Dec 12, 2024
@shikha372
Copy link
Copy Markdown
Contributor Author

Can you help me understand why do we need to provide default taggings when creating the constructs?

Mainly done on the basis of what exists today in VPC class and other modules in EC2, if customers want to apply more tags they can do it with Tag Aspect.

const NAME_TAG: string = 'Name';

https://github.com/search?q=repo%3Aaws%2Faws-cdk%20NAME_TAG&type=code

@shikha372 shikha372 changed the title chore(VpcV2): add tagging for VPC and components chore(VpcV2): add default name tag for VPC and components Dec 16, 2024
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 6, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 7, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: ae1e123
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jan 7, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit db345c5 into aws:main Jan 7, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 7, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants