diff --git a/CHANGELOG.md b/CHANGELOG.md index f56ea00fa..0a73d24f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ IMPROVEMENTS: * builder/amazon/all: Ability to specify the format of the temporary 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/openstack: Can now specify a project. [GH-382] * builder/virtualbox: Can now attach hard drive over SATA. [GH-391] diff --git a/builder/amazon/common/block_device.go b/builder/amazon/common/block_device.go index 74714f016..995d8f6bf 100644 --- a/builder/amazon/common/block_device.go +++ b/builder/amazon/common/block_device.go @@ -13,6 +13,7 @@ type BlockDevice struct { VolumeSize int64 `mapstructure:"volume_size"` DeleteOnTermination bool `mapstructure:"delete_on_termination"` IOPS int64 `mapstructure:"iops"` + NoDevice bool `mapstructure:"no_device"` } type BlockDevices struct { @@ -32,6 +33,7 @@ func buildBlockDevices(b []BlockDevice) []ec2.BlockDeviceMapping { VolumeSize: blockDevice.VolumeSize, DeleteOnTermination: blockDevice.DeleteOnTermination, IOPS: blockDevice.IOPS, + NoDevice: blockDevice.NoDevice, }) } return blockDevices