Skip to content

Commit

Permalink
add config to select aws logging driver mode and buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
vitpau committed Sep 5, 2024
1 parent 1ddcbe2 commit 773789c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 773789c

Please sign in to comment.