Skip to content

Commit

Permalink
fix: add missing api lambda source code hash
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gavanier committed Sep 28, 2023
1 parent b4b2754 commit d447dc4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions api-lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ resource "aws_lambda_function" "api_routes" {
if object.content_type == "application/zip"
}

function_name = replace(basename(each.key), "/\\..*/", "")
s3_bucket = aws_s3_bucket.api.id
s3_key = each.key
runtime = "nodejs18.x"
handler = "index.handler"
timeout = 20
memory_size = 2048
role = aws_iam_role.api_routes_roles.arn
function_name = replace(basename(each.key), "/\\..*/", "")
s3_bucket = aws_s3_bucket.api.id
s3_key = each.key
runtime = "nodejs18.x"
handler = "index.handler"
timeout = 20
memory_size = 2048
role = aws_iam_role.api_routes_roles.arn
source_code_hash = each.value.etag
}

resource "aws_cloudwatch_log_group" "api_routes" {
Expand Down

0 comments on commit d447dc4

Please sign in to comment.