provider/aws: Make iam_role_attachment example not throw any errors (#13843)

Fixes: #13398
pull/12231/merge
Paul Stack 9 years ago committed by GitHub
parent deea8d7603
commit 214a212704

@ -13,12 +13,40 @@ Attaches a Managed IAM Policy to an IAM role
```hcl
resource "aws_iam_role" "role" {
name = "test-role"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ec2.amazonaws.com"
},
"Effect": "Allow",
"Sid": ""
}
]
}
EOF
}
resource "aws_iam_policy" "policy" {
name = "test-policy"
description = "A test policy"
policy = # omitted
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"ec2:Describe*"
],
"Effect": "Allow",
"Resource": "*"
}
]
}
EOF
}
resource "aws_iam_role_policy_attachment" "test-attach" {

Loading…
Cancel
Save