feat(ec2): support network interface L2#28901
Conversation
|
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
|
This PR has been in the MERGE CONFLICTS state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
|
I suggest we hold off on this PR, as there is a more comprehensive one in progress right now. For more information, check out the RFC. |
|
This PR has been in the MERGE CONFLICTS state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
| privateIpAddress: props.privateIpAddress, | ||
| }] : undefined; | ||
| this.attachedNetworkInterfaces = [ | ||
| new class DummyNetworkInterface extends Resource implements INetworkInterface { |
There was a problem hiding this comment.
could you help me understand why do we need a dummy class here ?
| /** | ||
| * Adds a network interface to the instance. | ||
| */ | ||
| public addNetworkInterface(networkInterface: INetworkInterface, options: AddNetworkInterfaceOptions = {}) { |
There was a problem hiding this comment.
can a same network interface be attached to two instance? i think not.. let me know if that's not the case.
instead of taking a network interface as an argument, create a new one with and take in the parameters that are required to create n/w interface
|
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
|
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
|
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing To prevent automatic closure:
This PR will automatically close in 7 days if no action is taken. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for your contribution! Since there is now a more comprehensive solution with the VpcV2 construct that has been merged, I suggest we close this PR. If you have additional network interface improvements you'd like to propose, please feel free to open new PRs against the VpcV2 construct at package. Closing this PR to avoid duplicate implementations. |
|
Comments on closed issues and PRs are hard for our team to see. |
What change?
Add
ec2.NetworkInterfaceL2 constructs andec2.Instance.addNetworkInterface()method.Why need this change?
There are three reasons.
ec2.Instancedoesn't support additional IPv4 address. It is hard in the cace of advanced network architects (e.g. Multi-VPC ENI Attacements). To support network interface L2 is very usefull.ec2.Instancecan not get ID of network interface. Customers who need a network interface ID wants configure network interface at initializeec2.Instance.How to use this?
Following document is README.md.
Network Interface
You can attach additional network interfaces to an EC2 instance. Attaching multiple network interfaces to an instance is useful when you want to:
The following code how to add additional network interfaces for an EC2 instance.
You can also assign private IPv4 address from prefixes or specific IPv4 addresses.
The following code assigns IPv4 address from prefixes.
For more information see Scenarios for network interfaces.
Design decision-making
Additional network interfaces are not allow modify security group rules by
ec2.Instance.connections.allowXxx(). For allow network interface security group rules, customers must explicitly allow it in the security group of the network interface. This decision because, I think customers such as using network interface are need advanced networking architects, they wants specify security groups every network interfaces.What to do and what not to do in this PR
For minimize this PR size, I implement part of features. Not implemented features will implement at another PR after marged this.
Do
ec2.NetworkInterfaceconstructec2.INetworkInterfaceconstruct interfaceec2.Instance.addNetworkInterface()methodNetworkInterface.fromNetworkInterfaceAttributes())Do not
Ref
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license