Skip to content
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_route resource returns more than 1 target specified error when updating route target #16505

Closed
ghost opened this issue Dec 1, 2020 · 2 comments
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@ghost
Copy link

ghost commented Dec 1, 2020

This issue was originally opened by @petersin0422 as hashicorp/terraform#27061. It was migrated here as a result of the provider split. The original body of the issue is below.


We were trying to change a route from using gateway_id to vpc_peering_connection_id. The change did happened, but Terraform returned an error.

Terraform Version

v0.12.29

Terraform Configuration Files

resource "aws_route" "route" {
  route_table_id            = "rtb-0aa9c7a969699adcf"
  destination_cidr_block    = "172.25.x.x/32"
  vpc_peering_connection_id = "pcx-11111dae99999c4b9"
}

Debug Output

Crash Output

Expected Behavior

The change should complete without error.

Actual Behavior

The change complete, but with the following error.

Error: Error: more than 1 target specified. Only 1 of gateway_id, egress_only_gateway_id, nat_gateway_id, instance_id, network_interface_id, local_gateway_id, transit_gateway_id, vpc_endpoint_id, vpc_peering_connection_id is allowed.

Steps to Reproduce

  1. Deploy a aws_route resource with the gateway_id argument.
  2. Remove gateway_id argument and replace it with vpc_peering_connection_id.
  3. Apply the updated resource.

Additional Context

References

@ghost ghost added bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. labels Dec 1, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 1, 2020
@ewbankkit
Copy link
Contributor

ewbankkit commented Dec 1, 2020

@petersin0422 Thanks for raising this issue.
It has already been noticed in #12631 (amongst others). I'm going to close this one as a duplicate so that we can concentrate discussion in the linked issue.
Please add any additional comments there.

I have a WIP PR, #16219, to address this. Hopefully merged soon.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Dec 1, 2020
@ghost
Copy link
Author

ghost commented Jan 1, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

1 participant