Open
Description
Documentation Link(s)
Description
On current terraform registry documentation says:
integration_method
- (Optional) Integration's HTTP
method. Must be specified if integration_type
is not MOCK
.
On AWS says
IntegrationMethod
Specifies the integration's HTTP
method type. For WebSocket APIs, if you use a Lambda integration, you must set the integration method to POST
.
Required: Conditional
Type: String
Update requires: No interruption
My scenario:
I being stuck on this for a bit, as was using setting a integration_method
different than POST
and facing this error:
BadRequestException: HttpMethod must be POST for AWS_PROXY IntegrationType
This was a part of the scenario I face this error:
resource "aws_apigatewayv2_api" "this" {
name = var.gateway_name
protocol_type = "HTTP"
}
resource "aws_apigatewayv2_integration" "this" {
api_id = aws_apigatewayv2_api.this.id
integration_type = "AWS_PROXY"
# integration_method = "POST"
integration_uri = aws_lambda_function.this.invoke_arn
}
Once I remove the integration_method
bit (commented on the example), all works fine
References
Would you like to implement a fix?
Yes