Skip to content

Commit

Permalink
DACP: increase resources, make health check more lenient (#3557)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-k1998 authored Oct 4, 2023
1 parent a45fa8f commit 1d08eb8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
16 changes: 6 additions & 10 deletions terraform/environments/dacp/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ resource "aws_ecs_task_definition" "dacp_task_definition" {
network_mode = "awsvpc"
execution_role_arn = aws_iam_role.app_execution.arn
task_role_arn = aws_iam_role.app_task.arn
cpu = 1024
memory = 2048
cpu = 2048
memory = 4096
container_definitions = jsonencode([
{
name = "dacp-container"
image = "mcr.microsoft.com/dotnet/framework/aspnet:4.8"
cpu = 1024
memory = 2048
cpu = 2048
memory = 4096
essential = true
portMappings = [
{
Expand Down Expand Up @@ -150,10 +150,7 @@ resource "aws_iam_role_policy" "app_execution" {
{
"Action": [
"ecr:*",
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:DescribeLogStreams",
"logs:*",
"secretsmanager:GetSecretValue"
],
"Resource": "*",
Expand Down Expand Up @@ -202,8 +199,7 @@ resource "aws_iam_role_policy" "app_task" {
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents",
"logs:*",
"ecr:*",
"iam:*",
"ec2:*"
Expand Down
6 changes: 3 additions & 3 deletions terraform/environments/dacp/load_balancer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ resource "aws_lb_target_group" "dacp_target_group" {

health_check {
healthy_threshold = "3"
interval = "15"
interval = "30"
protocol = "HTTP"
port = "80"
unhealthy_threshold = "3"
unhealthy_threshold = "5"
matcher = "200-302"
timeout = "5"
timeout = "10"
}

}
Expand Down

0 comments on commit 1d08eb8

Please sign in to comment.