-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(ec2): Custom CfnVPC resource creation #13244
Conversation
…hod to bepassed the parent construct
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an interesting strategy.
For now, I honestly don't think we're going to accept any more incremental changes to VPCs in order for people to get it to do "their thing" with juuuust this one change.
VPCs are going to get a complete rework from the ground up at some point.
In the mean time, you are free and very welcome to start your own competing VPC construct with all the flexibility you need in a 3rd party construct library. In fact I'd encourage it! As long as your class implements IVpc
, it will interoperate with all places in the CDK where a VPC is needed.
We can then evaluate competing designs that are used in production, rather than speculative changes added incrementally that just keep accreting features and changes in the hope they'll be flexible enough.
@rix0rrr there have been quite a few requests from "the community" and none have been entertained. What's the next step here? We've provided alternatives only for all of them to be shut down. Can we at least agree on a process to improve the |
@rix0rrr , this ones really quite critical. CDK is sold as a community project and a a lot of people are contributing, this one keeps coming up repeatably. But it seems its being put off all the time. Vpcs are the core to so many things, and not having these features really depowers CDK significantly. |
Can you point me at were IVpc is? |
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-ec2.IVpc.html |
This extracts the
CfnVPC
resource creation into anIVpcResourceCreator
, allowing the user to provide their own implementation if so desired. The default logic has also been encapsulated in aDefaultVpcResourceCreator
class which more or less does what happens today. It also adds support for creation of secondary CIDR blocks.This is an attempt to start remedying user requests such as #5927 which request greater control over how the VPC creates its resources. This PR is an example of a way to fix the problem -- allow the VPC to accept implementations of resource creation (e.g. the VPC, Subnets, Route Tables, and more) and simply execute them. It also will make the VPC class smaller by splitting its logic up into smaller classes.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license