-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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: attach new security group to eth0 in an existing instance with 2 interfaces. #3205
Comments
+1 |
I'm seeing something similar that happens when trying to set monitoring = true on an ec2 instance resource. I have two network interfaces eth0 and eth1. Also in my case the ec2 was brought up with monitoring set to false. A later change set it to true in the tf file which is when this error pops up. Terraform v0.6.16 InvalidInstanceID: There are multiple interfaces attached to instance 'i-XXXXX'. Please specify an interface ID for the operation instead. |
same problem here |
Is there any update on this issue? We are experiencing the same issue when trying to add additional security groups to the default network interface built by the "aws_instance" resource. Terraform version : 0.8.4 Error: For network interfaces built with the aws_network_interface resource we are able to add and remove security groups. |
Have hit this issue and believe I understand the issue, however haven't had a chance to dig into the code to fix it. Terraform assumes there's a single interface on systems, and therefore appears to makes API calls to the effect of
I believe what terraform must do is determine the network interface id for the resource that is receiving the change, then apply the security groups on the network interface using something similar to The following is a quick and dirty script that provides a way around the issue for now, but only on the primary interface of the instance. It would need to be extended if the change is applied to the secondary interface.
|
Hi all, I came across this issue when solving #12933. The error:
Actually comes from Terraform attempting to set the That being said, after #12933 lands, users should be able to create their network interfaces directly in the instance resource, thus eliminating the need for the Please let me know if there are any other concerns with this issue, and I can try and address them in a future patch. ❤️ |
@grubernaut Can you expand on this please?:
We have this issue, multiple interfaces and need to make changes to the the interface security groups without having to rebuild the instance every time. Can you give a code snippet that would work? It's hard to tell if 12933 got merged into 0.9.2 or not. |
Hi @cnoffsin, #12933 has not been merged into TF 0.9.2 and has not been released yet. There are still some quirks that we need to solve before it can be released, and unfortunately other more pressing items have taken a higher priority. Once the patch in #12933 is merged, full documentation of the optional |
@grubernaut This is troubling because we are not sure what work-around we can even make when making security group changes to these instances with multiple interfaces without having terraform rebuild the instances every time. |
+1 |
* oss/master: changelog++ add support to use application default credentials to gcs storage backend (hashicorp#3257) Remove fake news about custom plugins Fix travis build on go 1.9 changelog++ stdout support for file backend via logger (hashicorp#3235) fix swallowed errors in pki package tests (hashicorp#3215) Fix API/AUTH/AppRole doc issue concerning bound_cidr_list (hashicorp#3205)
…3205) This patch fixes a little documentation issue. bind_cidr_list doesn't exist as parameter to AppRole creation. It should be "bound_cidr_list". In "path-help" it is documented correctly.
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. |
Hi all,
In my AWS infrastructure I've created a new security group (newsecgroup).
When attaching it to an already running instance with 2 interfaces, terraform raises the following error:
I only want to attach it to eth0, and not to eth1.
Here is my terraform definition:
If I don't define a resource for eth0 (default network interface), how can I specify the interface ID?
Any clue?
Thanks!
EDIT --> If I attach the security group using AWS console, and execute
terraform plan
, terraform shows "No changes".The text was updated successfully, but these errors were encountered: