Skip to content

Commit

Permalink
Restrict permissions on aws_iam_policy_document (#23)
Browse files Browse the repository at this point in the history
* restrict permissions on runtask action

* fix typo
  • Loading branch information
he2ss authored Nov 17, 2022
1 parent a57b8db commit d3f46b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ data "aws_iam_policy_document" "scheduled_task_cw_event_role_cloudwatch_policy"
effect = "Allow"
actions = ["ecs:RunTask"]
resources = ["*"]
condition {
test = "ArnEquals"
variable = "ecs:cluster"
values = [var.ecs_cluster_arn]
}
}
statement {
actions = ["iam:PassRole"]
Expand Down

0 comments on commit d3f46b0

Please sign in to comment.