Skip to content

Instantly share code, notes, and snippets.

@pagameba
Created November 7, 2017 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pagameba/9bf2344ede1c3b45cd398a79d28dac52 to your computer and use it in GitHub Desktop.
Save pagameba/9bf2344ede1c3b45cd398a79d28dac52 to your computer and use it in GitHub Desktop.
resource "aws_iam_role_policy" "ecs_service_policy" {
name = "ecs-service-policy-${var.name}"
role = "${aws_iam_role.ecs_service_role.id}"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:Describe*",
"elasticloadbalancing:DeregisterInstancesFromLoadBalancer",
"elasticloadbalancing:DeregisterTargets",
"elasticloadbalancing:Describe*",
"elasticloadbalancing:RegisterInstancesWithLoadBalancer",
"elasticloadbalancing:RegisterTargets"
],
"Resource": "*"
}
]
}
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment