Merge pull request #260 from jkinred/master

providers/amazon: Allow building of EC2 instances with ebs_optimized flag
This commit is contained in:
Mitchell Hashimoto 2014-09-07 16:01:59 -07:00
commit 634dd7e4a3

View File

@ -112,6 +112,12 @@ func resourceAwsInstance() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"ebs_optimized": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
},
},
}
}
@ -141,6 +147,7 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error {
PrivateIPAddress: d.Get("private_ip").(string),
AssociatePublicIpAddress: associatePublicIPAddress,
UserData: []byte(userData),
EbsOptimized: d.Get("ebs_optimized").(bool),
}
if v := d.Get("security_groups"); v != nil {
@ -307,6 +314,7 @@ func resourceAwsInstanceRead(d *schema.ResourceData, meta interface{}) error {
d.Set("private_dns", instance.PrivateDNSName)
d.Set("private_ip", instance.PrivateIpAddress)
d.Set("subnet_id", instance.SubnetId)
d.Set("ebs_optimized", instance.EbsOptimized)
var deps []terraform.ResourceDependency