Skip to content

Commit

Permalink
add a cloudwatch group for ecs
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-k1998 committed Mar 25, 2024
1 parent 7b5d55c commit 305c192
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions terraform/environments/wardship/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ resource "aws_cloudwatch_log_group" "deployment_logs" {
retention_in_days = "7"
}

resource "aws_cloudwatch_log_group" "ecs_logs" {
name = "wardship-ecs"
retention_in_days = "7"
}

resource "aws_ecs_task_definition" "wardship_task_definition" {
count = local.is-development ? 0 : 1
family = "wardshipFamily"
Expand All @@ -27,6 +32,14 @@ resource "aws_ecs_task_definition" "wardship_task_definition" {
cpu = 1024
memory = 2048
essential = true
logConfiguration = {
logDriver = "awslogs",
options = {
"awslogs-group" = aws_cloudwatch_log_group.ecs_logs.name,
"awslogs-region" = "eu-west-2",
"awslogs-stream-prefix" = "wardship-app"
}
},
portMappings = [
{
containerPort = 80
Expand Down

0 comments on commit 305c192

Please sign in to comment.