diff --git a/website/source/docs/builders/amazon-ebs.html.markdown b/website/source/docs/builders/amazon-ebs.html.markdown index 8a1a8ccc8..eb1782464 100644 --- a/website/source/docs/builders/amazon-ebs.html.markdown +++ b/website/source/docs/builders/amazon-ebs.html.markdown @@ -58,6 +58,12 @@ Required: Optional: +* `ami_block_device_mappings` (array of block device mappings) - Add the block + 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" (int), "delete_on_termination" (bool), + and "iops" (int). + * `ami_description` (string) - The description to set for the resulting AMI(s). By default this description is empty. @@ -77,6 +83,10 @@ Optional: [IAM instance profile](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html) to launch the EC2 instance with. +* `launch_block_device_mappings` (array of block device mappings) - Add the + block device mappings to the launch instance. The block device mappings are + the same as `ami_block_device_mappings` above. + * `security_group_id` (string) - The ID (_not_ the name) of the security group to assign to the instance. By default this is not set and Packer will automatically create a new temporary security group to allow SSH @@ -130,6 +140,34 @@ the section above for more information on what environmental variables Packer will look for. +## AMI Block Device Mappings Example + +Here is an example using the optional AMI block device mappings. This will add +the /dev/sdb and /dev/sdc block device mappings to the finished AMI. + +
+{
+  "type": "amazon-ebs",
+  "access_key": "YOUR KEY HERE",
+  "secret_key": "YOUR SECRET KEY HERE",
+  "region": "us-east-1",
+  "source_ami": "ami-de0d9eb7",
+  "instance_type": "t1.micro",
+  "ssh_username": "ubuntu",
+  "ami_name": "packer-quick-start {{timestamp}}",
+  "ami_block_device_mappings": [
+      {
+          "device_name": "/dev/sdb",
+          "virtual_name": "ephemeral0"
+      },
+      {
+          "device_name": "/dev/sdc",
+          "virtual_name": "ephemeral1"
+      }
+  ]
+}
+
+ ## Tag Example Here is an example using the optional AMI tags. This will add the tags diff --git a/website/source/docs/builders/amazon-instance.html.markdown b/website/source/docs/builders/amazon-instance.html.markdown index 3622c2b34..0e56dce80 100644 --- a/website/source/docs/builders/amazon-instance.html.markdown +++ b/website/source/docs/builders/amazon-instance.html.markdown @@ -73,6 +73,13 @@ Required: Optional: +* `ami_block_device_mappings` (array of block device mappings) - Add the block + 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" (int), "delete_on_termination" (bool), + and "iops" (int). See [amazon-ebs](/docs/builders/amazon-ebs.html) for an + example template. + * `ami_description` (string) - The description to set for the resulting AMI(s). By default this description is empty. @@ -108,6 +115,10 @@ Optional: [IAM instance profile](http://docs.aws.amazon.com/IAM/latest/UserGuide/instance-profiles.html) to launch the EC2 instance with. +* `launch_block_device_mappings` (array of block device mappings) - Add the + block device mappings to the launch instance. The block device mappings are + the same as `ami_block_device_mappings` above. + * `security_group_id` (string) - The ID (_not_ the name) of the security group to assign to the instance. By default this is not set and Packer will automatically create a new temporary security group to allow SSH