(aws-ec2): Create non-synth VPC constructor usable in service catalog products #23198
Closed
2 tasks
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
Create a VPC constructor similar to
ec2.Vpc.from_lookup
that can use dynamic (or static) references without doing any synth-time lookup.Use Case
I would like to use CDK to define a servicecatalog product that is shared with an entire ou. It therefore needs a CloudFormation render that doesn't depend on synth-time lookups. This is, generally, possible with CDK L2 constructs EXCEPT that many things depend on
ec2.Vpc
and providing such an object that uses CFN dynamic references (or parameter references) is non-obvious. A constructor for Vpc that lets the invoker specify vpc id, private subnets, public subnets, etc as references would enable existing L2 constructs to be used inservicecatalog.ProductStack
stacks.Proposed Solution
ec2.Vpc.from_references(stack, vpc_id="vpc-foo", public_subnets=["foo","bar","baz"])
Other Information
No response
Acknowledgements
CDK version used
2.53.0
Environment details (OS name and version, etc.)
Linux docker-desktop 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: