(ec2) return all cidr information for looked up VPC
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the feature
The looked up vpc only returns the primary cidrBlock. Would like to have information of all CIDRs returned as well (with [Vpc.cidrBlockAssociationSet](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Vpc.html))
### Use Case
Use case is to get list of CIDR blocks attached to the VPC when using CDK
### Proposed Solution
Couple important spots to adjust to support this feature. May be incomplete
[LookedUpVpc construct](https://github.com/aws/aws-cdk/blob/9487b39d6da4ab7efd884c3a8379b03e317786b9/packages/%40aws-cdk/aws-ec2/lib/vpc.ts#L1970)
[VpcContextResponse](https://github.com/aws/aws-cdk/blob/ca3920dbd588ebd9c68f17bfbf420713cf42790a/packages/%40aws-cdk/cx-api/lib/context/vpc.ts#L67)
[return value from context provider](https://github.com/jumic/aws-cdk/blob/ea7802b4b5ea4781ed884fc8d330173b192d569d/packages/aws-cdk/lib/context-providers/vpcs.ts#L136)
### Other Information
Requested from internal ticket P62779596
### Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
current
### Environment details (OS name and version, etc.)
mac
Contributor guide
Research direction
Trace the looked-up VPC flow through packages/@aws-cdk/aws-ec2/lib/vpc.ts, packages/@aws-cdk/cx-api/lib/context/vpc.ts, and packages/aws-cdk/lib/context-providers/vpcs.ts. Start with the linked locations and verify how cidrBlockAssociationSet is represented and passed through context. Done means a looked-up VPC exposes all attached CIDR blocks while preserving the existing primary cidrBlock behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100