Skip to content

Commit

Permalink
Merge pull request #366 from ministryofjustice/nd-624
Browse files Browse the repository at this point in the history
enable ecs sessions manager for dns-dhcp
  • Loading branch information
asifamirat00 authored Dec 3, 2024
2 parents 0968459 + 62b14ef commit 534a56a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
13 changes: 7 additions & 6 deletions modules/dns/ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ resource "aws_ecs_cluster" "server_cluster" {
}

resource "aws_ecs_service" "service" {
name = "${var.prefix}-service"
cluster = aws_ecs_cluster.server_cluster.id
task_definition = aws_ecs_task_definition.server_task.arn
desired_count = 5
launch_type = "FARGATE"
tags = var.tags
name = "${var.prefix}-service"
cluster = aws_ecs_cluster.server_cluster.id
task_definition = aws_ecs_task_definition.server_task.arn
desired_count = 5
launch_type = "FARGATE"
tags = var.tags
enable_execute_command = true

lifecycle {
ignore_changes = [desired_count]
Expand Down
11 changes: 10 additions & 1 deletion modules/dns_dhcp_common/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ resource "aws_iam_role_policy" "ecs_task_policy" {
"cloudwatch:PutMetricData"
],
"Resource": ["*"]
}
},{
"Effect": "Allow",
"Action": [
"ssmmessages:CreateControlChannel",
"ssmmessages:CreateDataChannel",
"ssmmessages:OpenControlChannel",
"ssmmessages:OpenDataChannel"
],
"Resource": ["*"]
}
]
}
EOF
Expand Down

0 comments on commit 534a56a

Please sign in to comment.