From f8353387278d47cfa13b6e3e45ab1a5b8116108f Mon Sep 17 00:00:00 2001 From: scott alexander Date: Thu, 1 Feb 2024 15:08:40 +0000 Subject: [PATCH] build fixes around conditional assessors (#140) Co-authored-by: Scott Alexander --- infrastructure/lambda-nems-message.tf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infrastructure/lambda-nems-message.tf b/infrastructure/lambda-nems-message.tf index 0b7ca575..9b46ac42 100644 --- a/infrastructure/lambda-nems-message.tf +++ b/infrastructure/lambda-nems-message.tf @@ -72,8 +72,9 @@ module "nems-message-lambda-alarm-topic" { } resource "aws_lambda_event_source_mapping" "nems_message_lambda" { - event_source_arn = module.sqs-nems-queue.endpoint - function_name = module.nems-message-lambda.endpoint + count = local.is_mesh_forwarder_enable ? 1 : 0 + event_source_arn = module.sqs-nems-queue[0].endpoint + function_name = module.nems-message-lambda[0].endpoint depends_on = [ module.sqs-nems-queue,