feat(VpcV2): adding imports for SubnetV2 and VpcV2(WIP)
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()andSubnetV2.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:
- Import a VPC with primary IPv4
- Import a subnet with primary IPv4
- Import a VPC with multiple secondary IPv4
- Import a VPC with Amazon provided IPV6
- Import a VPC with Ipam provided IPv6/IPv4
- Import subnet individually using fromSubnetV2attributes
- Imported different type of multiple subnets
- Add gateways/endpoint to imported vpc
Checklist
- [x] My code adheres to the CONTRIBUTING GUIDE and DESIGN GUIDELINES
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
@Mergifyio update
update
✅ Branch has been successfully updated
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
@Mergifyio merge
@mergifyio queue
queue
✅ The pull request has been merged automatically
The pull request has been merged automatically at d108a8003e463301acea15076501cd815b0eda4a
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.