-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaws_api_gateway_integration.tf
26 lines (24 loc) · 1.13 KB
/
aws_api_gateway_integration.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
resource "aws_api_gateway_integration" "options" {
connection_type = "INTERNET"
http_method = "OPTIONS"
passthrough_behavior = "WHEN_NO_MATCH"
rest_api_id = aws_api_gateway_rest_api.default.id
resource_id = aws_api_gateway_resource.resource.id
timeout_milliseconds = "29000"
type = "MOCK"
request_templates = {
"application/json" = "{\"statusCode\": 200}"
}
}
resource "aws_api_gateway_integration" "post" {
connection_type = "INTERNET"
content_handling = "CONVERT_TO_TEXT"
http_method = aws_api_gateway_method.post.http_method
integration_http_method = aws_api_gateway_method.post.http_method
passthrough_behavior = "WHEN_NO_MATCH"
rest_api_id = aws_api_gateway_rest_api.default.id
resource_id = aws_api_gateway_resource.resource.id
timeout_milliseconds = "29000"
type = "AWS_PROXY"
uri = "arn:aws:apigateway:${var.aws_region}:lambda:path/2015-03-31/functions/arn:aws:lambda:${var.aws_region}:${var.aws_account_id}:function:${var.lambda_function_name}/invocations"
}