Closed choosy closed 7 years ago
I looks like we can do this by adding a network_interface
attribute to Instance, and specifying the NetworkInterfaceId
in the InstanceNetworkInterfaceSpecification
@catsby, actually it is not the same thing with the one I am requesting. I am already using the InstanceNetworkInterface specification to attach an eni to an instance. But when creating an instance, aws already makes an eni, before you attach anything. So when you attach something, you will end up with a second eni. So for example by default, if you use device_index = 0 in the eni-instance attachment, you will have an error like:
if you use other device_index, you will get two enis, even if you only need one. And if for example you want to attach to enis, like we need in our scenario, you won't be able. Because you will have three in total (two plus the default one), and aws has a limit on this.
That is why, the aws api call for creating an instance have a specific parameter for indicating an ani. That's the default and first eni with which the instance start. Whatever attachements you do afterwards, come on top of that.
@catsby This is really annoying for me. Would like to help here if I can. Any chance you can point me in the right direction?
+1, I'm setting up some critical instances (eg, Kubernetes master) that should have ENIs in case they ever fall over. My options are a) create instance with auto ENI and manually turn off the ENI's "Delete on terminate" attribute, or b) attach a second ENI to every instance, leaving the original eth0 dangling per @choosy and preventing the use of an additional ENI.
It would be much easier if I could specify the ENI on instance creation, and this is already supported by the AWS API.
I just ran into this as well. I would prefer to assign eth0 to an end I create. I've got 2 ENIs that get created, but I end up with a total of 3 interfaces on the instance. I would prefer just two. I can do this via the AWS cli as well as cloudformation. Has there been any work done on this?
Hi, also hitting up against this. Just wondering if there's much movement on the issue.
Also needing this - and can we use it from within a aws_launch_configuration?
+1
+1
Trying to set up a Netscaler instance, which needs 3 ENIs to access the 3 subnets. 3 is the maximum and I tried to attach 4 ENIs to get around this missing feature, but that will not work. I need to associate an EIP to the default (eth0) ENI, but there is no way to attach an ENI to eth0, overriding the existing ENI.
Alternatively, if I could access the id of the ENI created with the instance (eth0), I would be able to attach the EIP directly to it without the need to replace it.
+1 This would be great and solve issue #1557 (probably better this solution is more generic)
+1. I'm hitting up against this too.
+1
Also have the same issue. The link from instance to its interfaces needs be maintained.
+1 please!
+1. Experiencing same issue with indicating the network interface to use when launching an instance, and wanting to be able to Tag/Name this default Network Interface.
+1 - Have the same issue.
+1 yes please!
+1
+1 We need to attach more than a network interface to an intances. network_instances_ids must be a list.
+1
Hi, same here, this issue prevents us from terraforming a critical part of our infrastructure.
I've noticed there are at least two already opened pull-requests for this: https://github.com/hashicorp/terraform/pull/10244 https://github.com/hashicorp/terraform/pull/10516
@sebcreme
@Andy--Rose for a workaround to the NetScaler issue, you could try using CloudFormation for just the NS VPX. Here is an example: https://github.com/chiradeep/netscaler-autoscale-lambda/tree/master/setup
+1
+1
+1
Use case is for name servers referenced in DHCP options. The ENIs are setup by another team's automation when the VPC is created. I need to find and use those ENIs when starting the instances that provide recursive name resolution.
Fixed via #12933
Thanks for the fix :)
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
There needs to be a way to indicate the network interface to use when launching an instance. This way, the default (eth0) network interface of the instance could be the one indicated. Otherwise, a later attached network interface will be added on top of the default one.