Skip to content

Commit

Permalink
Merge pull request #319 from lflux/aws-instance-iam-support
Browse files Browse the repository at this point in the history
Add IAM Instance profile support to AWS instance provider
  • Loading branch information
mitchellh committed Sep 27, 2014
2 parents 1c73f4e + 9f91c4e commit 5da86c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builtin/providers/aws/resource_aws_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func resourceAwsInstance() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
},
"iam_instance_profile": &schema.Schema{
Type: schema.TypeString,
ForceNew: true,
Optional: true,
},
},
}
}
Expand Down Expand Up @@ -147,6 +152,7 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error {
AssociatePublicIpAddress: associatePublicIPAddress,
UserData: []byte(userData),
EbsOptimized: d.Get("ebs_optimized").(bool),
IamInstanceProfile: d.Get("iam_instance_profile").(string),
}

if v := d.Get("security_groups"); v != nil {
Expand Down
2 changes: 2 additions & 0 deletions website/source/docs/providers/aws/r/instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ The following arguments are supported:
* `source_dest_check` - (Optional) Controls if traffic is routed to the instance when
the destination address does not match the instance. Used for NAT or VPNs. Defaults true.
* `user_data` - (Optional) The user data to provide when launching the instance.
* `iam_instance_profile` - (Optional) The IAM Instance Profile to
launch the instance with.

## Attributes Reference

Expand Down

0 comments on commit 5da86c1

Please sign in to comment.