Despite zip file is not changed lambda is updating with archive every apply
# zip lambda archive
data "archive_file" "lambda_zip" {
type = "zip"
source_file = "${path.module}/src/${local.fullname}.rb"
output_path = "${path.module}/src/${local.fullname}.zip"
}
resource "aws_lambda_function" "func" {
filename = "${path.module}/src/${local.fullname}.zip"
function_name = "lsm_${local.basename}"
role = aws_iam_role.recyclerLambda.arn
handler = "${local.fullname}.lambda_handler"
source_code_hash = data.archive_file.lambda_zip.output_base64sha256
runtime = "ruby2.5"
tags = {
bt_tier = var.bt_tier
deployed_by = "Terraform"
}
}
The same with md5 checksum. The actual checksum of file on FS is not changing.
Please advice
Thanks,
Sergii