Skip to content

Commit d3f46b0

Browse files
authored
Restrict permissions on aws_iam_policy_document (#23)
* restrict permissions on runtask action * fix typo
1 parent a57b8db commit d3f46b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ data "aws_iam_policy_document" "scheduled_task_cw_event_role_cloudwatch_policy"
1717
effect = "Allow"
1818
actions = ["ecs:RunTask"]
1919
resources = ["*"]
20+
condition {
21+
test = "ArnEquals"
22+
variable = "ecs:cluster"
23+
values = [var.ecs_cluster_arn]
24+
}
2025
}
2126
statement {
2227
actions = ["iam:PassRole"]

0 commit comments

Comments
 (0)