From bb82e451670fc8e073dcec8dc8d48260de89b0af Mon Sep 17 00:00:00 2001 From: jbeemster Date: Tue, 21 Nov 2023 11:26:46 +0700 Subject: [PATCH] Update main.tf --- main.tf | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/main.tf b/main.tf index 108fc44..b81ad78 100644 --- a/main.tf +++ b/main.tf @@ -271,9 +271,6 @@ module "instance_type_metrics" { } locals { - byte_limit_sqs = var.byte_limit > 192000 ? 192000 : var.byte_limit - record_limit_sqs = var.record_limit > 10 ? 10 : var.record_limit - collector_hocon = templatefile("${path.module}/templates/config.hocon.tmpl", { sink_type = var.sink_type port = var.ingress_port @@ -287,8 +284,8 @@ locals { bad_sqs_buffer_name = var.bad_sqs_buffer_name region = data.aws_region.current.name - byte_limit = var.sink_type == "kinesis" ? var.byte_limit : local.byte_limit_sqs - record_limit = var.sink_type == "kinesis" ? var.record_limit : local.record_limit_sqs + byte_limit = var.sink_type == "kinesis" ? var.byte_limit : min(var.byte_limit, 192000) + record_limit = var.sink_type == "kinesis" ? var.record_limit : min(var.record_limit, 10) time_limit_ms = var.time_limit_ms telemetry_disable = !var.telemetry_enabled