Skip to content

Commit

Permalink
Update main.tf
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeemster committed Nov 21, 2023
1 parent e39b0b4 commit bb82e45
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit bb82e45

Please sign in to comment.