-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Updating network_interface_id in aws_route fails #2270
Comments
this bug is caused by hashicorp/terraform#7686 |
I was able to successfully update a route using new
Terraform properly updated the route resource and I verified that the change occurred in AWS.
|
Sorry this was set to close with a recently merged pull request. I think we should specifically write an acceptance test that ensures updating an |
I'm not sure why this was closed with the PRs affecting route imports. That appears to be an unrelated issue? This problem still exists. If I create a route with a next-hop of an ENI, and then later change the ENI that the route points to, I get the error mentioned in this issue. Original resource:
Updated resource:
Results in this:
I can manually taint the resource and it replaces without issue. Let me know what other information I can provide to help remedy this. Thanks! |
Yeah - I'm getting the same thing with 11.14 TFE. I opened a support ticket. Maybe they'll reopen this. |
hi @kellersyf @jonathanhle I'm going to reopen this issue as I don't see any evidence of the fix in the merged PRs, along with the fact that folks are still seeing this error. In order to best help could we get a sample configuration with the instance resource included that is generating this error? Have you tired running your configuration in 0.12.10 with the latest provider? If so are you running into the same issue? |
I just face this issue on Terraform v0.12.10 + provider.aws v2.32.0.
(3) fails with the error mentioned in this issue. c572134 changed |
I expect terraform sends UpdateRoute request with NetworkInterfaceID, but actually it sends InstanceID always. |
Is it possible to just do a straight-up replace of the routes when they're updated? Is there any benefit in doing an in-place change vs a remove/re-create of the route? That would solve pretty much all your cases for updating, and the API call is very quick. |
Unfortunately, can't move my code base to 0.12.10 yet. Have only tried the above on 0.11.14. |
Switching routes over to another ENI is part of an automated failover process I'm working on, so as a workaround I run a one-liner before doing so that
...which produces output like:
Explanation:
|
…ents' to test route to 2 ENIs attached to the same instance (hashicorp#2270). Acceptance test output (failure expected): $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments -timeout 120m === RUN TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === PAUSE TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === CONT TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments --- FAIL: TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments (127.29s) testing.go:684: Step 1 error: errors during apply: Error: InvalidInstanceID: There are multiple interfaces attached to instance 'i-005065eb4850f01a4'. Please specify an interface ID for the operation instead. status code: 400, request id: f601a6af-729a-4830-835b-be8887b0c3ee on /tmp/tf-test358593801/main.tf line 98: (source code not available) FAIL FAIL github.com/terraform-providers/terraform-provider-aws/aws 127.347s FAIL GNUmakefile:26: recipe for target 'testacc' failed make: *** [testacc] Error 1
…ents' to test route to 2 ENIs attached to the same instance (hashicorp#2270). Acceptance test output (failure expected): $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments -timeout 120m === RUN TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === PAUSE TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === CONT TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments --- FAIL: TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments (127.29s) testing.go:684: Step 1 error: errors during apply: Error: InvalidInstanceID: There are multiple interfaces attached to instance 'i-005065eb4850f01a4'. Please specify an interface ID for the operation instead. status code: 400, request id: f601a6af-729a-4830-835b-be8887b0c3ee on /tmp/tf-test358593801/main.tf line 98: (source code not available) FAIL FAIL github.com/terraform-providers/terraform-provider-aws/aws 127.347s FAIL GNUmakefile:26: recipe for target 'testacc' failed make: *** [testacc] Error 1
…ents' to test route to 2 ENIs attached to the same instance (hashicorp#2270). Acceptance test output (failure expected): $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments -timeout 120m === RUN TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === PAUSE TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === CONT TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments --- FAIL: TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments (127.29s) testing.go:684: Step 1 error: errors during apply: Error: InvalidInstanceID: There are multiple interfaces attached to instance 'i-005065eb4850f01a4'. Please specify an interface ID for the operation instead. status code: 400, request id: f601a6af-729a-4830-835b-be8887b0c3ee on /tmp/tf-test358593801/main.tf line 98: (source code not available) FAIL FAIL github.com/terraform-providers/terraform-provider-aws/aws 127.347s FAIL GNUmakefile:26: recipe for target 'testacc' failed make: *** [testacc] Error 1
…ents' to test route to 2 ENIs attached to the same instance (hashicorp#2270). Acceptance test output (failure expected): $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments -timeout 120m === RUN TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === PAUSE TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === CONT TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments --- FAIL: TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments (127.29s) testing.go:684: Step 1 error: errors during apply: Error: InvalidInstanceID: There are multiple interfaces attached to instance 'i-005065eb4850f01a4'. Please specify an interface ID for the operation instead. status code: 400, request id: f601a6af-729a-4830-835b-be8887b0c3ee on /tmp/tf-test358593801/main.tf line 98: (source code not available) FAIL FAIL github.com/terraform-providers/terraform-provider-aws/aws 127.347s FAIL GNUmakefile:26: recipe for target 'testacc' failed make: *** [testacc] Error 1
…ents' to test route to 2 ENIs attached to the same instance (hashicorp#2270). Acceptance test output (failure expected): $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments -timeout 120m === RUN TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === PAUSE TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === CONT TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments --- FAIL: TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments (127.29s) testing.go:684: Step 1 error: errors during apply: Error: InvalidInstanceID: There are multiple interfaces attached to instance 'i-005065eb4850f01a4'. Please specify an interface ID for the operation instead. status code: 400, request id: f601a6af-729a-4830-835b-be8887b0c3ee on /tmp/tf-test358593801/main.tf line 98: (source code not available) FAIL FAIL github.com/terraform-providers/terraform-provider-aws/aws 127.347s FAIL GNUmakefile:26: recipe for target 'testacc' failed make: *** [testacc] Error 1
…ents' to test route to 2 ENIs attached to the same instance (hashicorp#2270). Acceptance test output (failure expected): $ make testacc TEST=./aws/ TESTARGS='-run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments' ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./aws/ -v -count 1 -parallel 20 -run=TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments -timeout 120m === RUN TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === PAUSE TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments === CONT TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments --- FAIL: TestAccAWSRoute_IPv4_To_NetworkInterface_TwoAttachments (127.29s) testing.go:684: Step 1 error: errors during apply: Error: InvalidInstanceID: There are multiple interfaces attached to instance 'i-005065eb4850f01a4'. Please specify an interface ID for the operation instead. status code: 400, request id: f601a6af-729a-4830-835b-be8887b0c3ee on /tmp/tf-test358593801/main.tf line 98: (source code not available) FAIL FAIL github.com/terraform-providers/terraform-provider-aws/aws 127.347s FAIL GNUmakefile:26: recipe for target 'testacc' failed make: *** [testacc] Error 1
This has been released in version 3.34.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Terraform Version
Terraform v0.10.8
provider.aws 1.2.0
Affected Resource(s)
Terraform Configuration Files
Config 1:
Config 2 (updated network_interface_id):
Debug Output
https://gist.github.com/lethalpaga/28714fe7180b2debce09489c77ba1556
Expected Behavior
The route should have been updated with the new ENI id
Actual Behavior
The apply fails with
Steps to Reproduce
terraform apply
with config1 to create the routeterraform apply
with config2 to attempt updating itImportant Factoids
References
The text was updated successfully, but these errors were encountered: