FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_iam_user_policy

Provides an IAM policy attached to a user.

Example Usage

resource "aws_iam_user_policy" "lb_ro" {
    name = "test"
    user = "${aws_iam_user.lb.name}"
    policy = <<EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "ec2:Describe*"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}
EOF
}

resource "aws_iam_user" "lb" {
    name = "loadbalancer"
    path = "/system/"
}

resource "aws_iam_access_key" "lb" {
    user = "${aws_iam_user.lb.name}"
}

Argument Reference

The following arguments are supported:

Attributes Reference

This resource has no attributes.


See the source of this document at Terraform.io