From f6457ed189741adc14933eb2ebdc65c9cad91f37 Mon Sep 17 00:00:00 2001 From: Mark Peek Date: Tue, 6 Aug 2013 15:16:39 -0700 Subject: [PATCH] website: cleanup Amazon AMI tag documentation --- .../docs/builders/amazon-ebs.html.markdown | 30 +++++++++++++++---- .../builders/amazon-instance.html.markdown | 2 ++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/website/source/docs/builders/amazon-ebs.html.markdown b/website/source/docs/builders/amazon-ebs.html.markdown index 2ea9d4d8d..e67e945a5 100644 --- a/website/source/docs/builders/amazon-ebs.html.markdown +++ b/website/source/docs/builders/amazon-ebs.html.markdown @@ -78,11 +78,11 @@ Optional: * `subnet_id` (string) - If using VPC, the ID of the subnet, such as "subnet-12345def", where Packer will launch the EC2 instance. +* `tags` (object of key/value strings) - Tags applied to the AMI. + * `vpc_id` (string) - If launching into a VPC subnet, Packer needs the VPC ID in order to create a temporary security group within the VPC. -* `tags` (array of key/value pairs) - Tags applied to the AMI. - ## Basic Example Here is a basic example. It is completely valid except for the access keys: @@ -97,10 +97,6 @@ Here is a basic example. It is completely valid except for the access keys: "instance_type": "t1.micro", "ssh_username": "ubuntu", "ami_name": "packer-quick-start {{.CreateTime}}", - "tags": { - "myTagName1": "myTagValue1", - "myTagName2": "myTagValue2" - } } @@ -111,6 +107,28 @@ the section above for more information on what environmental variables Packer will look for. +## Tag Example + +Here is an example using the optional AMI tags. This will add the tags +"OS_Version" and "Release" 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 {{.CreateTime}}",
+  "tags": {
+    "OS_Version": "Ubuntu",
+    "Release": "Latest"
+  }
+}
+
+ ## AMI Name Variables The AMI name specified by the `ami_name` configuration variable is actually diff --git a/website/source/docs/builders/amazon-instance.html.markdown b/website/source/docs/builders/amazon-instance.html.markdown index f44b0d86e..35399340c 100644 --- a/website/source/docs/builders/amazon-instance.html.markdown +++ b/website/source/docs/builders/amazon-instance.html.markdown @@ -109,6 +109,8 @@ Optional: * `subnet_id` (string) - If using VPC, the ID of the subnet, such as "subnet-12345def", where Packer will launch the EC2 instance. +* `tags` (object of key/value strings) - Tags applied to the AMI. + * `vpc_id` (string) - If launching into a VPC subnet, Packer needs the VPC ID in order to create a temporary security group within the VPC.