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

API Gateway v2 is missing support for updating route key #13814

Closed
davidaah opened this issue Jun 17, 2020 · 2 comments · Fixed by #13833
Closed

API Gateway v2 is missing support for updating route key #13814

davidaah opened this issue Jun 17, 2020 · 2 comments · Fixed by #13833
Assignees
Labels
bug Addresses a defect in current functionality. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service.
Milestone

Comments

@davidaah
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.26

Affected Resource(s)

  • aws_apigatewayv2_route

Terraform Configuration Files

Initial configuration:

...
resource "aws_apigatewayv2_route" "test" {
  api_id    = aws_apigatewayv2_api.test.id
  route_key = "GET /mypath"

  target = "integrations/${aws_apigatewayv2_integration.test.id}"
}
...

Updated configuration:

...
resource "aws_apigatewayv2_route" "test" {
  api_id    = aws_apigatewayv2_api.test.id
  route_key = "GET /mynewpath"

  target = "integrations/${aws_apigatewayv2_integration.test.id}"
}
...

Expected Behavior

Route key should be updated

Confirm it is supported with AWS CLI:

$ aws apigatewayv2 update-route --api-id <api id> --route-id <route id> --route-key "GET /mynewpath"

{
    "RouteId": "<route id>",
    "RouteKey": "GET /mynewpath",
    "Target": "integrations/<integration id>"
}

In the debug output it appears that the updated "route key" is not sent in the API payload. Additionally, looking at the source referenced below, it looks like the Update directive is missing a condition for route_key

Actual Behavior

Error: error updating API Gateway v2 route: BadRequestException: Invalid route name content specified.

Steps to Reproduce

  1. terraform apply with initial route key
  2. terraform apply with the new route key

References

@ghost ghost added the service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. label Jun 17, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 17, 2020
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 18, 2020
@ewbankkit ewbankkit self-assigned this Jun 18, 2020
@breathingdust breathingdust added this to the v3.0.0 milestone Jul 22, 2020
@ghost
Copy link

ghost commented Jul 31, 2020

This has been released in version 3.0.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!

@ghost
Copy link

ghost commented Aug 22, 2020

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 and limited conversation to collaborators Aug 22, 2020
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/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants