File tree Expand file tree Collapse file tree
terraform/data_replication Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,3 +64,25 @@ resource "aws_iam_role_policy_attachment" "ecs_task_fargate" {
6464 role = aws_iam_role. ecs_task_role . name
6565 policy_arn = aws_iam_policy. shell_access_policy . arn
6666}
67+
68+ resource "aws_iam_policy" "data_replication_access" {
69+ name = " DataReplicationAccessPolicy"
70+ policy = jsonencode ({
71+ Version = " 2012-10-17"
72+ Statement = [
73+ {
74+ Effect = " Allow"
75+ Action = [
76+ " ecs:ListTasks" ,
77+ " ecs:DescribeTasks" ,
78+ " ecs:ExecuteCommand"
79+ ]
80+ Resource = [
81+ " arn:aws:ecs:eu-west-2:393416225559:cluster/mavis-${ var . environment } -data-replication*" ,
82+ " arn:aws:ecs:eu-west-2:393416225559:task/mavis-${ var . environment } -data-replication*/*" ,
83+ " arn:aws:ecs:eu-west-2:393416225559:container-instance/mavis-${ var . environment } -data-replication*/*"
84+ ]
85+ }
86+ ]
87+ })
88+ }
You can’t perform that action at this time.
0 commit comments