diff --git a/main.tf b/main.tf index 42b7120..cf1b52f 100644 --- a/main.tf +++ b/main.tf @@ -146,6 +146,8 @@ locals { "awslogs-group" = var.log_group_name != "" ? var.log_group_name : aws_cloudwatch_log_group.main.0.name, "awslogs-region" = data.aws_region.current.name "awslogs-stream-prefix" = "container" + "mode" = var.aws_log_driver_mode + "max-buffer-size" = var.aws_log_max_buffer_size }, local.log_multiline_pattern) container_definition = merge({ diff --git a/variables.tf b/variables.tf index 36dec86..fea051e 100644 --- a/variables.tf +++ b/variables.tf @@ -153,6 +153,18 @@ variable "log_multiline_pattern" { type = string } +variable "aws_log_driver_mode" { + description = "The log mode option controls whether to use the blocking (default) or non-blocking log delivery" + default = "blocking" + type = string +} + +variable "aws_log_max_buffer_size" { + description = "Controls the size of the buffer used for intermediate log message storage when aws_log_driver_mode is set to non-blocking" + default = "1m" + type = string +} + variable "health_check" { description = "A health block containing health check settings for the target group. Overrides the defaults." type = map(string)