theherk / terraform-aws-apigateway-proxy

Terraform module to create an api gateway that proxies requests.
https://registry.terraform.io/modules/theherk/apigateway-proxy/aws/latest
MIT License
1 stars 0 forks source link

integration_http_method can only be POST for Lambda #3

Open shahriar52 opened 3 months ago

shahriar52 commented 3 months ago

In the aws_api_gateway_integration resource definition, integration_http_method is derived as below,

integration_http_method = contains(["AWS", "AWS_PROXY", "HTTP", "HTTP_PROXY"], each.value.config.type) ? aws_api_gateway_method.this[each.key].http_method : null

That would be equal to the API Gateway resource method. For Lambda, that value can only be "POST".

Reference: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_integration#integration_http_method

theherk commented 3 months ago

That's true, and I set the method as such when using lambda. If you'd prefer the module have this logic, you can suggest a change, but I'm not sure it is needed.