Skip to content

Commit

Permalink
Merge pull request #9 from schubergphilis/fix-scheduled-event-role
Browse files Browse the repository at this point in the history
bug: incorrect event role principal
  • Loading branch information
mlflr authored Dec 2, 2024
2 parents 1a795ee + 989ac10 commit 72aa6a6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ locals {
role_policy = data.aws_iam_policy_document.ecs_task.json
}
"task_events" = {
name = "${local.iam_name_prefix}EcsEvents"
policy_arns = ["arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceEventsRole"]
name = "${local.iam_name_prefix}EcsEvents"
policy_arns = ["arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceEventsRole"]
principal_identifiers = ["events.amazonaws.com"]
}
"task_execution" = {
name = "${local.iam_name_prefix}EcsTaskExecution"
Expand Down Expand Up @@ -149,7 +150,7 @@ module "iam_role" {
path = var.iam_role_path
permissions_boundary = var.iam_permissions_boundary
policy_arns = try(each.value.policy_arns, [])
principal_identifiers = ["ecs-tasks.amazonaws.com"]
principal_identifiers = try(each.value.principal_identifiers, ["ecs-tasks.amazonaws.com"])
principal_type = "Service"
role_policy = try(each.value.role_policy, null)
tags = var.tags
Expand Down

0 comments on commit 72aa6a6

Please sign in to comment.