Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws-ec2): Create non-synth VPC constructor usable in service catalog products #23198

Closed
2 tasks
jeffb4 opened this issue Dec 1, 2022 · 2 comments
Closed
2 tasks
Assignees
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.

Comments

@jeffb4
Copy link
Contributor

jeffb4 commented Dec 1, 2022

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 in servicecatalog.ProductStack stacks.

Proposed Solution

ec2.Vpc.from_references(stack, vpc_id="vpc-foo", public_subnets=["foo","bar","baz"])

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

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

@jeffb4 jeffb4 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Dec 1, 2022
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Dec 1, 2022
@jeffb4
Copy link
Contributor Author

jeffb4 commented Dec 1, 2022

Uh, you know, looking at the ec2.Vpc. fromVpcAttributes source code, that's the exact intent of that constructor so I'll close this. I guess a blurb in the docs about the "right" way to use that constructor might have prevented this question, but who knows. Sorry for the noise!

@jeffb4 jeffb4 closed this as completed Dec 1, 2022
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants