Skip to content

Commit a6a36e1

Browse files
committed
fix(ecs-background): update IAM policy resource to allow all actions on task definition ARN
1 parent c44632c commit a6a36e1

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

modules/ecs-background/schedule.tf

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ resource "aws_iam_policy" "scheduler" {
5353
Action = [
5454
"ecs:RunTask"
5555
]
56-
Resource = [module.ecs_task.task_definition_arn_without_revision]
56+
Resource = ["${module.ecs_task.task_definition_arn_without_revision}:*"]
5757
},
5858
{ # allow scheduler to set the IAM roles of your task
5959
Effect = "Allow",
@@ -89,16 +89,15 @@ resource "aws_scheduler_schedule" "scheduled_task" {
8989
# schedule always uses latest revision
9090
task_definition_arn = module.ecs_task.task_definition_arn_without_revision
9191
launch_type = var.ecs_launch_type
92-
dynamic "capacity_provider_strategy" {
93-
for_each = var.ecs_capacity_provider_strategies
94-
95-
content {
96-
base = capacity_provider_strategy.value.base
97-
capacity_provider = capacity_provider_strategy.value.capacity_provider
98-
weight = capacity_provider_strategy.value.weight
99-
}
100-
}
101-
92+
# dynamic "capacity_provider_strategy" {
93+
# for_each = var.ecs_capacity_provider_strategies
94+
95+
# content {
96+
# base = capacity_provider_strategy.value.base
97+
# capacity_provider = capacity_provider_strategy.value.capacity_provider
98+
# weight = capacity_provider_strategy.value.weight
99+
# }
100+
# }
102101

103102
network_configuration {
104103
assign_public_ip = var.assign_public_ip

0 commit comments

Comments
 (0)