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,