forked from QloudX/terraform-AWS-Lambda-REST-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlambda.tf
More file actions
16 lines (16 loc) · 674 Bytes
/
lambda.tf
File metadata and controls
16 lines (16 loc) · 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module "lambda_function" {
source = "terraform-aws-modules/lambda/aws"
for_each = var.lambda_functions
function_name = each.key
runtime = each.value.runtime
handler = each.value.handler
create_package = false
local_existing_package = each.value.zip
create_current_version_allowed_triggers = false
allowed_triggers = {
api-gateway = {
service = "apigateway"
source_arn = "${aws_api_gateway_rest_api.rest_api.execution_arn}/*/*/*"
}
}
}