Skip to content

Commit

Permalink
disable http api format version 2.0 for HTTP_PROXY
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Vlasic committed Mar 10, 2022
1 parent 007807e commit 4e95585
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/terraform/modules/http-api/api.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ resource "aws_apigatewayv2_route" "http" {
resource "aws_apigatewayv2_integration" "http" {
for_each = local.integrations
api_id = aws_apigatewayv2_api.http.id
payload_format_version = "2.0"
payload_format_version = each.value.type == "AWS_PROXY" ? "2.0" : "1.0"
integration_type = each.value.type
integration_method = each.value.integration_method
integration_uri = each.value.uri
Expand All @@ -58,7 +58,7 @@ resource "aws_apigatewayv2_route" "http_proxy" {
resource "aws_apigatewayv2_integration" "http_proxy" {
for_each = local.integrations
api_id = aws_apigatewayv2_api.http.id
payload_format_version = "2.0"
payload_format_version = each.value.type == "AWS_PROXY" ? "2.0" : "1.0"
integration_type = each.value.type
integration_method = each.value.integration_method
integration_uri = each.value.type == "AWS_PROXY" ? each.value.uri : "${each.value.uri}/{proxy}"
Expand Down

0 comments on commit 4e95585

Please sign in to comment.