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 (Web Sockets) Integration error on re-apply #13261

Closed
mcqj opened this issue May 11, 2020 · 4 comments · Fixed by #13266
Closed

Api Gateway V2 (Web Sockets) Integration error on re-apply #13261

mcqj opened this issue May 11, 2020 · 4 comments · Fixed by #13266
Labels
bug Addresses a defect in current functionality. service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service.
Milestone

Comments

@mcqj
Copy link

mcqj commented May 11, 2020

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.24
provider.aws v2.61.0

Affected Resource(s)

"aws_apigatewayv2_integration"

Terraform Configuration Files

resource "aws_apigatewayv2_integration" "message-int" {
  api_id = aws_apigatewayv2_api.websocket.id
  integration_type = "AWS_PROXY"
  integration_uri = aws_lambda_function.message.invoke_arn
#  passthrough_behavior = "WHEN_NO_MATCH"
}

Expected Behavior

No error on modification

Actual Behavior

Error on modification/
When run in a clean environment, the integration is created correctly and runs as expected.
However, if any change is made to the terraform config, attempting to re-apply results in the following error.

Error: error updating API Gateway v2 integration: BadRequestException: Invalid HttpMethod specified. Valid options are GET,PUT,POST,DELETE,PATCH,OPTIONS,HEAD,ANY

As this is a websockets API, the reference to HTTP methods is hard to fathom.

Steps to Reproduce

  1. terraform apply
@ghost ghost added the service/apigatewayv2 Issues and PRs that pertain to the apigatewayv2 service. label May 11, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label May 11, 2020
@ewbankkit
Copy link
Contributor

@mcqj Thanks for raising this. I can reproduce and will address with a PR.
As a workaround, you should be able to explicitly set

integration_method = "POST"

@mcqj
Copy link
Author

mcqj commented May 14, 2020

Thanks @ewbankkit - I can confirm that the workaround solved the issue.

@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 23, 2020
@breathingdust breathingdust added this to the v3.0.0 milestone Jul 28, 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 27, 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 27, 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
3 participants