Skip to content

Commit

Permalink
feat: add support for log multiline pattern (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcerda95 authored Apr 13, 2021
1 parent 0195dec commit c962e1e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ resource "aws_ecs_task_definition" "task" {
"options": {
"awslogs-group": "${aws_cloudwatch_log_group.main.name}",
"awslogs-region": "${data.aws_region.current.name}",
%{if var.log_multiline_pattern != ""~}
"awslogs-multiline-pattern": "${var.log_multiline_pattern}",
%{~endif}
"awslogs-stream-prefix": "container"
}
},
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ variable "log_retention_in_days" {
type = number
}

variable "log_multiline_pattern" {
description = "Optional regular expression. Log messages will consist of a line that matches expression and any following lines that don't"
default = ""
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 c962e1e

Please sign in to comment.