Merge pull request #319 from lflux/aws-instance-iam-support

Add IAM Instance profile support to AWS instance provider
This commit is contained in:
Mitchell Hashimoto 2014-09-27 12:43:18 -07:00
commit 5da86c1279
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