Add IAM Instance profile support to AWS instance provider

This commit is contained in:
Ian Delahorne 2014-09-23 13:06:30 -05:00
parent 0b7e0cf8b5
commit 9f91c4e8c3
2 changed files with 8 additions and 0 deletions

View File

@ -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,
},
},
}
}
@ -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 {

View File

@ -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