Skip to content

Commit

Permalink
update ecs_task role name
Browse files Browse the repository at this point in the history
  • Loading branch information
avrohomgottlieb committed Sep 25, 2024
1 parent f073407 commit 7b6b0d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions infrastructure/batch/roles.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_iam_role_policy_attachment" "batch_service_role" {
policy_arn = "arn:aws:iam::aws:policy/service-role/AWSBatchServiceRole"
}

resource "aws_iam_role" "ecs_task_role" {
resource "aws_iam_role" "ecs_task_execution_role" {
name = "scpca-portal-ecs-task-role-${var.user}-${var.stage}"

assume_role_policy = <<EOF
Expand All @@ -44,7 +44,7 @@ resource "aws_iam_role" "ecs_task_role" {
}

resource "aws_iam_role_policy_attachment" "ecs_task_execution_role_policy" {
role = aws_iam_role.ecs_task_role.name
role = aws_iam_role.ecs_task_execution_role.name
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"
}

Expand Down Expand Up @@ -76,6 +76,6 @@ resource "aws_iam_policy" "ecs_task_s3_access_policy" {
}

resource "aws_iam_role_policy_attachment" "ecs_task_s3_access_policy_attachment" {
role = aws_iam_role.ecs_task_role.name
role = aws_iam_role.ecs_task_execution_role.name
policy_arn = aws_iam_policy.ecs_task_s3_access_policy.arn
}

0 comments on commit 7b6b0d6

Please sign in to comment.