aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

feat(VpcV2): adding imports for SubnetV2 and VpcV2(WIP)

Open shikha372 opened this issue 1 year ago • 1 comments

Issue # (if applicable)

Tracking https://github.com/aws/aws-cdk/issues/30762.

Reason for this change

Allow users to define imports for a VPC or subnet defined outside current stack definition.

Description of changes

  • Added new methods under VpcV2 and Subnet VpcV2.fromVpcV2Attributes() and SubnetV2.fromSubnetV2Attributes()

  • Added new L2 for VPCCidrBlock to allow import of secondary addresses. VPCCidrBlock

  • Added new integration test and unit test file to check import related functionality.

  • Updated Readme.

  • Fixed an earlier issue with subnet range check, fixed to include IPAM defined IPv4 address as well

Description of how you validated changes

Deployed and tested for below scenarios in account:

  1. Import a VPC with primary IPv4
  2. Import a subnet with primary IPv4
  3. Import a VPC with multiple secondary IPv4
  4. Import a VPC with Amazon provided IPV6
  5. Import a VPC with Ipam provided IPv6/IPv4
  6. Import subnet individually using fromSubnetV2attributes
  7. Imported different type of multiple subnets
  8. Add gateways/endpoint to imported vpc

Checklist


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

shikha372 avatar Oct 15 '24 18:10 shikha372

@Mergifyio update

moelasmar avatar Oct 28 '24 23:10 moelasmar

update

✅ Branch has been successfully updated

mergify[bot] avatar Oct 28 '24 23:10 mergify[bot]

AWS CodeBuild CI Report

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

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

aws-cdk-automation avatar Oct 29 '24 00:10 aws-cdk-automation

@Mergifyio merge

moelasmar avatar Oct 29 '24 00:10 moelasmar

merge

❌ Sorry but I didn't understand the command. Please consult the commands documentation 📚.

mergify[bot] avatar Oct 29 '24 00:10 mergify[bot]

@mergifyio queue

moelasmar avatar Oct 29 '24 00:10 moelasmar

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at d108a8003e463301acea15076501cd815b0eda4a

mergify[bot] avatar Oct 29 '24 00:10 mergify[bot]

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[bot] avatar Oct 29 '24 00:10 github-actions[bot]