Allow building of EC2 instances with ebs_optimized flag
This commit is contained in:
parent
b52d323040
commit
2b764de383
|
@ -112,6 +112,12 @@ func resourceAwsInstance() *schema.Resource {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
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),
|
PrivateIPAddress: d.Get("private_ip").(string),
|
||||||
AssociatePublicIpAddress: associatePublicIPAddress,
|
AssociatePublicIpAddress: associatePublicIPAddress,
|
||||||
UserData: []byte(userData),
|
UserData: []byte(userData),
|
||||||
|
EbsOptimized: d.Get("ebs_optimized").(bool),
|
||||||
}
|
}
|
||||||
|
|
||||||
if v := d.Get("security_groups"); v != nil {
|
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_dns", instance.PrivateDNSName)
|
||||||
d.Set("private_ip", instance.PrivateIpAddress)
|
d.Set("private_ip", instance.PrivateIpAddress)
|
||||||
d.Set("subnet_id", instance.SubnetId)
|
d.Set("subnet_id", instance.SubnetId)
|
||||||
|
d.Set("ebs_optimized", instance.EbsOptimized)
|
||||||
|
|
||||||
var deps []terraform.ResourceDependency
|
var deps []terraform.ResourceDependency
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue