Skip to content

Commit

Permalink
aws_iam_role_policy_attachment documentation update2
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosdiez committed Jun 29, 2018
1 parent 0ef33b6 commit 1fa528d
Showing 1 changed file with 3 additions and 40 deletions.
43 changes: 3 additions & 40 deletions website/docs/r/codedeploy_deployment_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,46 +33,9 @@ resource "aws_iam_role" "example" {
EOF
}
resource "aws_iam_role_policy" "example" {
name = "example-policy"
role = "${aws_iam_role.example.id}"
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"autoscaling:CompleteLifecycleAction",
"autoscaling:DeleteLifecycleHook",
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:DescribeLifecycleHooks",
"autoscaling:PutLifecycleHook",
"autoscaling:RecordLifecycleActionHeartbeat",
"codedeploy:Batch*",
"codedeploy:Get*",
"codedeploy:List*",
"ec2:DescribeInstances",
"ec2:DescribeInstanceStatus",
"elasticloadbalancing:Describe*",
"elasticloadbalancing:DeregisterInstancesFromLoadBalancer",
"elasticloadbalancing:RegisterInstancesWithLoadBalancer",
"elasticloadbalancing:RegisterTargets",
"elasticloadbalancing:DeregisterTargets",
"tag:GetTags",
"tag:GetResources",
"sns:Publish"
],
"Resource": "*"
}
]
}
EOF
resource "aws_iam_role_policy_attachment" "AWSCodeDeployRole" {
policy_arn = "arn:aws:iam::aws:policy/service-role/AWSCodeDeployRole"
role = "${aws_iam_role.example.name}"
}
resource "aws_codedeploy_app" "example" {
Expand Down

0 comments on commit 1fa528d

Please sign in to comment.