-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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): select subnets that contain IP address(es) #8526
feat(ec2): select subnets that contain IP address(es) #8526
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
I'm going to put my foot down and say no to this. We should have stopped adding random J selector for everyone's use case to this interface a long time ago.
Please turn this into a protocol with an interface that people can implement in their own projects (mark the interface @subclassable
), and then use that protocol to solve your use case in your app code.
To clarify -- a user would instantiate an object which implements this protocol, and the user passes to subnet selection? Also, I assume we leave support for existing subnet selection options? |
Yes, exactly that.
Yes we can't take those away without breaking compatibility. |
Resolving in favor of #10112 |
Continuation of #8526 This change adds a feature to SubnetSelection which lets the user provide objects that implements the new `ISubnetSelector` interface. These objects will be used by the VPC class to choose the subnets from the VPC. This commit also provides an implementation of an ISubnetSelector that lets the user select subnets that contain IP addresses. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
feat(ec2): select subnets that contain IP address(es)
It is currently not possible to search for subnets that contain a particular IP address or range of addresses, because
ISubnet
does not expose the CIDR blocks. Users with fixed-ip resources in a VPC cannot then determine what the associated subnet is.This commit exposes the CIDR block for ISubnet, and adds a feature to SubnetSelection that allows a user to select subnets based on whether they contain any of a set of IPv4 addresses.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license