github.com/markdia/terraform@v0.5.1-0.20150508012022-f1ae920aa970/website/source/docs/providers/aws/r/iam_instance_profile.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_iam_instance_profile" 4 sidebar_current: "docs-aws-resource-iam-instance-profile" 5 description: |- 6 Provides an IAM instance profile. 7 --- 8 9 # aws\_iam\_instance\_profile 10 11 Provides an IAM instance profile. 12 13 ## Example Usage 14 15 ``` 16 resource "aws_iam_role" "role" { 17 name = "test_role" 18 path = "/" 19 policy = <<EOF 20 { 21 "Version": "2012-10-17", 22 "Statement": [ 23 { 24 "Action": [ 25 "ec2:Describe*" 26 ], 27 "Effect": "Allow", 28 "Resource": "*" 29 } 30 ] 31 } 32 EOF 33 } 34 35 resource "aws_iam_instance_profile" "test_profile" { 36 name = "test_profile" 37 roles = ["${aws_iam_role.role.name}"] 38 } 39 ``` 40 41 ## Argument Reference 42 43 The following arguments are supported: 44 45 * `name` - (Required) The profile's name. 46 * `path` - (Optional, default "/") Path in which to create the profile. 47 * `roles` - (Required) A list of role names to include in the profile. 48 49 ## Attribute Reference 50 51 * `id` - The instance profile's ID. 52 * `arn` - The ARN assigned by AWS to the instance profile. 53 * `create_date` - The creation timestamp of the instance profile. 54 * `name` - The instance profile's name. 55 * `path` - The path of the instance profile in IAM. 56 * `roles` - The list of roles assigned to the instance profile. 57 * `unique_id` - The [unique ID][1] assigned by AWS. 58 59 [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html#GUIDs