Skip to content

Commit 5a0d430

Browse files
committed
add ssm policy
1 parent 0a6650f commit 5a0d430

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

iam-ecs-task.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,25 @@ resource "aws_iam_role_policy_attachment" "ecs_task" {
2222
role = "${aws_iam_role.ecs_task.name}"
2323
policy_arn = "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"
2424
}
25+
26+
resource "aws_iam_role_policy" "ssm_policy" {
27+
name = "ecs-ssm-policy"
28+
role = "${aws_iam_role.ecs_task.name}"
29+
30+
policy = <<EOF
31+
{
32+
"Version": "2012-10-17",
33+
"Statement": [
34+
{
35+
"Effect": "Allow",
36+
"Action": [
37+
"ssm:GetParameters"
38+
],
39+
"Resource": [
40+
"arn:aws:ssm:*:*:parameter/*"
41+
]
42+
}
43+
]
44+
}
45+
EOF
46+
}

0 commit comments

Comments
 (0)