builder/amazon/common: support NoDevice [GH-396]

This commit is contained in:
Mitchell Hashimoto 2013-09-06 11:44:57 -07:00
parent a511b603e2
commit c4cf8553c8
2 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,7 @@ IMPROVEMENTS:
* builder/amazon/all: Ability to specify the format of the temporary * builder/amazon/all: Ability to specify the format of the temporary
keypair created. [GH-389] keypair created. [GH-389]
* builder/amazon/all: Support the NoDevice flag for block mappings. [GH-396]
* builder/digitalocean: Retry on any pending event errors. * builder/digitalocean: Retry on any pending event errors.
* builder/openstack: Can now specify a project. [GH-382] * builder/openstack: Can now specify a project. [GH-382]
* builder/virtualbox: Can now attach hard drive over SATA. [GH-391] * builder/virtualbox: Can now attach hard drive over SATA. [GH-391]

View File

@ -13,6 +13,7 @@ type BlockDevice struct {
VolumeSize int64 `mapstructure:"volume_size"` VolumeSize int64 `mapstructure:"volume_size"`
DeleteOnTermination bool `mapstructure:"delete_on_termination"` DeleteOnTermination bool `mapstructure:"delete_on_termination"`
IOPS int64 `mapstructure:"iops"` IOPS int64 `mapstructure:"iops"`
NoDevice bool `mapstructure:"no_device"`
} }
type BlockDevices struct { type BlockDevices struct {
@ -32,6 +33,7 @@ func buildBlockDevices(b []BlockDevice) []ec2.BlockDeviceMapping {
VolumeSize: blockDevice.VolumeSize, VolumeSize: blockDevice.VolumeSize,
DeleteOnTermination: blockDevice.DeleteOnTermination, DeleteOnTermination: blockDevice.DeleteOnTermination,
IOPS: blockDevice.IOPS, IOPS: blockDevice.IOPS,
NoDevice: blockDevice.NoDevice,
}) })
} }
return blockDevices return blockDevices