From fecd5a7e4ad9005acd8ef2ebc15feea24924cea8 Mon Sep 17 00:00:00 2001 From: tymnicholas <46499723+tymnicholas@users.noreply.github.com> Date: Fri, 25 Jul 2025 12:06:36 +0800 Subject: [PATCH 1/2] Update variables.tf --- variables.tf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/variables.tf b/variables.tf index 9b48615..786ab2b 100644 --- a/variables.tf +++ b/variables.tf @@ -470,3 +470,10 @@ variable "apigw_id" { type = string default = null } + +# to allow deployments with other lambda triggers and update version whenever there is new deployment +variable "enable_lambda_update_evt_src_mapping" { + description = "Enable Lambda function to update it's event source mapping when there is a new deployment" + type = bool + default = false +} From c74e66c8403dfc0e11af7617202c143fb9020d4c Mon Sep 17 00:00:00 2001 From: tymnicholas <46499723+tymnicholas@users.noreply.github.com> Date: Fri, 25 Jul 2025 12:07:03 +0800 Subject: [PATCH 2/2] Update data.tf --- data.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data.tf b/data.tf index 67ccd52..014c7cc 100644 --- a/data.tf +++ b/data.tf @@ -59,7 +59,7 @@ data "aws_iam_policy_document" "update_lambda" { } dynamic "statement" { - for_each = var.enable_version_identifier ? [1] : [] + for_each = var.enable_lambda_update_evt_src_mapping ? [1] : [] content { sid = "AllowLambdaUpdateEvtSrcMapping" actions = [