diff --git a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.expected.json b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.expected.json index d344a7f79e42c..111cda251e137 100644 --- a/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.expected.json +++ b/packages/@aws-cdk/aws-ecs-patterns/test/ec2/integ.scheduled-ecs-task.lit.expected.json @@ -449,9 +449,7 @@ "Action": [ "ecs:ListContainerInstances", "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange", - "ecs:UpdateContainerInstancesState", - "ecs:ListTasks" + "ecs:SubmitTaskStateChange" ], "Effect": "Allow", "Resource": { @@ -460,6 +458,29 @@ "Arn" ] } + }, + { + "Action": [ + "ecs:UpdateContainerInstancesState", + "ecs:ListTasks" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:ecs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":container-instance/*" + ] + ] + } } ], "Version": "2012-10-17" @@ -614,6 +635,37 @@ "EcsClusterDefaultAutoScalingGroupLifecycleHookDrainHookRoleA38EC83B" ] }, + "ScheduledEc2TaskScheduledEventRuleFE2376A2": { + "Type": "AWS::Events::Rule", + "Properties": { + "ScheduleExpression": "rate(1 minute)", + "State": "ENABLED", + "Targets": [ + { + "Arn": { + "Fn::GetAtt": [ + "EcsCluster97242B84", + "Arn" + ] + }, + "EcsParameters": { + "TaskCount": 2, + "TaskDefinitionArn": { + "Ref": "ScheduledEc2TaskScheduledTaskDef56328BA4" + } + }, + "Id": "awsecsintegecsScheduledEc2TaskScheduledTaskDef18FB4348", + "Input": "{}", + "RoleArn": { + "Fn::GetAtt": [ + "ScheduledEc2TaskScheduledTaskDefEventsRole64113C5F", + "Arn" + ] + } + } + ] + } + }, "ScheduledEc2TaskScheduledTaskDefTaskRoleC3FA127C": { "Type": "AWS::IAM::Role", "Properties": { @@ -829,37 +881,6 @@ } ] } - }, - "ScheduledEc2TaskScheduledEventRuleFE2376A2": { - "Type": "AWS::Events::Rule", - "Properties": { - "ScheduleExpression": "rate(1 minute)", - "State": "ENABLED", - "Targets": [ - { - "Arn": { - "Fn::GetAtt": [ - "EcsCluster97242B84", - "Arn" - ] - }, - "EcsParameters": { - "TaskCount": 2, - "TaskDefinitionArn": { - "Ref": "ScheduledEc2TaskScheduledTaskDef56328BA4" - } - }, - "Id": "awsecsintegecsScheduledEc2TaskScheduledTaskDef18FB4348", - "Input": "{}", - "RoleArn": { - "Fn::GetAtt": [ - "ScheduledEc2TaskScheduledTaskDefEventsRole64113C5F", - "Arn" - ] - } - } - ] - } } }, "Parameters": { diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.expected.json index 692b586e9ccf0..ee4f2df7ecdb4 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.expected.json +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-awsvpc-nw.expected.json @@ -605,9 +605,7 @@ "Action": [ "ecs:ListContainerInstances", "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange", - "ecs:UpdateContainerInstancesState", - "ecs:ListTasks" + "ecs:SubmitTaskStateChange" ], "Effect": "Allow", "Resource": { @@ -616,6 +614,29 @@ "Arn" ] } + }, + { + "Action": [ + "ecs:UpdateContainerInstancesState", + "ecs:ListTasks" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:ecs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":container-instance/*" + ] + ] + } } ], "Version": "2012-10-17" diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.expected.json index 98e43f40c4912..ab85830609c05 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.expected.json +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.lb-bridge-nw.expected.json @@ -626,9 +626,7 @@ "Action": [ "ecs:ListContainerInstances", "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange", - "ecs:UpdateContainerInstancesState", - "ecs:ListTasks" + "ecs:SubmitTaskStateChange" ], "Effect": "Allow", "Resource": { @@ -637,6 +635,29 @@ "Arn" ] } + }, + { + "Action": [ + "ecs:UpdateContainerInstancesState", + "ecs:ListTasks" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:ecs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":container-instance/*" + ] + ] + } } ], "Version": "2012-10-17" diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.expected.json index f341974270a3e..b2efd45499ee1 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.expected.json +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-awsvpc-nw.expected.json @@ -605,9 +605,7 @@ "Action": [ "ecs:ListContainerInstances", "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange", - "ecs:UpdateContainerInstancesState", - "ecs:ListTasks" + "ecs:SubmitTaskStateChange" ], "Effect": "Allow", "Resource": { @@ -616,6 +614,29 @@ "Arn" ] } + }, + { + "Action": [ + "ecs:UpdateContainerInstancesState", + "ecs:ListTasks" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:ecs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":container-instance/*" + ] + ] + } } ], "Version": "2012-10-17" diff --git a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.expected.json b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.expected.json index bb423ca150ddd..c457923c78cae 100644 --- a/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.expected.json +++ b/packages/@aws-cdk/aws-ecs/test/ec2/integ.sd-bridge-nw.expected.json @@ -605,9 +605,7 @@ "Action": [ "ecs:ListContainerInstances", "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange", - "ecs:UpdateContainerInstancesState", - "ecs:ListTasks" + "ecs:SubmitTaskStateChange" ], "Effect": "Allow", "Resource": { @@ -616,6 +614,29 @@ "Arn" ] } + }, + { + "Action": [ + "ecs:UpdateContainerInstancesState", + "ecs:ListTasks" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:ecs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":container-instance/*" + ] + ] + } } ], "Version": "2012-10-17" diff --git a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json index 7816a7c459ca5..f54cf6544f995 100644 --- a/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json +++ b/packages/@aws-cdk/aws-events-targets/test/ecs/integ.event-ec2-task.lit.expected.json @@ -449,9 +449,7 @@ "Action": [ "ecs:ListContainerInstances", "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange", - "ecs:UpdateContainerInstancesState", - "ecs:ListTasks" + "ecs:SubmitTaskStateChange" ], "Effect": "Allow", "Resource": { @@ -460,6 +458,29 @@ "Arn" ] } + }, + { + "Action": [ + "ecs:UpdateContainerInstancesState", + "ecs:ListTasks" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:ecs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":container-instance/*" + ] + ] + } } ], "Version": "2012-10-17" diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.ec2-task.expected.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.ec2-task.expected.json index 4d03787417868..81c21ad370623 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.ec2-task.expected.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/integ.ec2-task.expected.json @@ -249,9 +249,7 @@ "Action": [ "ecs:ListContainerInstances", "ecs:SubmitContainerStateChange", - "ecs:SubmitTaskStateChange", - "ecs:UpdateContainerInstancesState", - "ecs:ListTasks" + "ecs:SubmitTaskStateChange" ], "Effect": "Allow", "Resource": { @@ -260,6 +258,29 @@ "Arn" ] } + }, + { + "Action": [ + "ecs:UpdateContainerInstancesState", + "ecs:ListTasks" + ], + "Effect": "Allow", + "Resource": { + "Fn::Join": [ + "", + [ + "arn:aws:ecs:", + { + "Ref": "AWS::Region" + }, + ":", + { + "Ref": "AWS::AccountId" + }, + ":container-instance/*" + ] + ] + } } ], "Version": "2012-10-17"