From 3a45712780a4aa7cbd44f2498b8580b63fe95460 Mon Sep 17 00:00:00 2001 From: Greg Burek Date: Thu, 22 May 2014 11:36:22 -0700 Subject: [PATCH] Adds support for encrypted EBS volumes --- builder/amazon/common/block_device.go | 2 ++ website/source/docs/builders/amazon-ebs.html.markdown | 3 ++- website/source/docs/builders/amazon-instance.html.markdown | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/builder/amazon/common/block_device.go b/builder/amazon/common/block_device.go index 6cfe18f10..a17fab82f 100644 --- a/builder/amazon/common/block_device.go +++ b/builder/amazon/common/block_device.go @@ -8,6 +8,7 @@ import ( type BlockDevice struct { DeleteOnTermination bool `mapstructure:"delete_on_termination"` DeviceName string `mapstructure:"device_name"` + Encrypted bool `mapstructure:"encrypted"` IOPS int64 `mapstructure:"iops"` NoDevice bool `mapstructure:"no_device"` SnapshotId string `mapstructure:"snapshot_id"` @@ -34,6 +35,7 @@ func buildBlockDevices(b []BlockDevice) []ec2.BlockDeviceMapping { DeleteOnTermination: blockDevice.DeleteOnTermination, IOPS: blockDevice.IOPS, NoDevice: blockDevice.NoDevice, + Encrypted: blockDevice.Encrypted, }) } return blockDevices diff --git a/website/source/docs/builders/amazon-ebs.html.markdown b/website/source/docs/builders/amazon-ebs.html.markdown index 885095ada..f46e2d0da 100644 --- a/website/source/docs/builders/amazon-ebs.html.markdown +++ b/website/source/docs/builders/amazon-ebs.html.markdown @@ -62,7 +62,8 @@ each category, the available configuration keys are alphabetized. device mappings to the AMI. The block device mappings allow for keys: "device\_name" (string), "virtual\_name" (string), "snapshot\_id" (string), "volume\_type" (string), "volume\_size" (integer), "delete\_on\_termination" - (boolean), "no\_device" (boolean), and "iops" (integer). + (boolean), "encrypted" (boolean), "no\_device" (boolean), and "iops" + (integer). * `ami_description` (string) - The description to set for the resulting AMI(s). By default this description is empty. diff --git a/website/source/docs/builders/amazon-instance.html.markdown b/website/source/docs/builders/amazon-instance.html.markdown index 5b11bb12f..238eaead2 100644 --- a/website/source/docs/builders/amazon-instance.html.markdown +++ b/website/source/docs/builders/amazon-instance.html.markdown @@ -84,7 +84,7 @@ each category, the available configuration keys are alphabetized. device mappings to the AMI. The block device mappings allow for keys: "device\_name" (string), "virtual\_name" (string), "snapshot\_id" (string), "volume\_type" (string), "volume\_size" (integer), "delete\_on\_termination" - (boolean), "no\_device" (boolean), and "iops" (integer). + (boolean), "encrypted" (boolean), "no\_device" (boolean), and "iops" (integer). See [amazon-ebs](/docs/builders/amazon-ebs.html) for an example template. * `ami_description` (string) - The description to set for the resulting