Merge pull request #319 from lflux/aws-instance-iam-support
Add IAM Instance profile support to AWS instance provider
This commit is contained in:
commit
5da86c1279
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue