FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_iam_instance_profile

Provides an IAM instance profile.

Example Usage

resource "aws_iam_instance_profile" "test_profile" {
    name = "test_profile"
    roles = ["${aws_iam_role.role.name}"]
}

resource "aws_iam_role" "role" {
    name = "test_role"
    path = "/"
    assume_role_policy = <<EOF
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": "sts:AssumeRole",
            "Principal": {
               "Service": "ec2.amazonaws.com"
            },
            "Effect": "Allow",
            "Sid": ""
        }
    ]
}
EOF
}

Argument Reference

The following arguments are supported:

Attribute Reference


See the source of this document at Terraform.io