Model/infrastructure/terraform/modules/lambda_service_zip/main.tf

24 lines
No EOL
564 B
HCL

resource "aws_lambda_function" "this" {
function_name = var.name
role = var.role_arn
package_type = "Zip"
filename = var.filename
source_code_hash = var.source_code_hash
handler = var.handler
runtime = var.runtime
timeout = var.timeout
memory_size = var.memory_size
publish = true
environment {
variables = var.environment
}
}
output "lambda_arn" {
value = aws_lambda_function.this.arn
}
output "function_name" {
value = aws_lambda_function.this.function_name
}