Add IAM Instance profile support to AWS instance provider
This commit is contained in:
parent
0b7e0cf8b5
commit
9f91c4e8c3
|
@ -117,6 +117,11 @@ func resourceAwsInstance() *schema.Resource {
|
||||||
Type: schema.TypeBool,
|
Type: schema.TypeBool,
|
||||||
Optional: true,
|
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,
|
AssociatePublicIpAddress: associatePublicIPAddress,
|
||||||
UserData: []byte(userData),
|
UserData: []byte(userData),
|
||||||
EbsOptimized: d.Get("ebs_optimized").(bool),
|
EbsOptimized: d.Get("ebs_optimized").(bool),
|
||||||
|
IamInstanceProfile: d.Get("iam_instance_profile").(string),
|
||||||
}
|
}
|
||||||
|
|
||||||
if v := d.Get("security_groups"); v != nil {
|
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
|
* `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.
|
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.
|
* `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
|
## Attributes Reference
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue