Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
5e786e3b
Commit
5e786e3b
authored
Jun 15, 2015
by
Clint
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2250 from mitchellh/b-amazon-block-docs
Document Amazon Block Device Mapping fields
parents
523a3342
d22c4173
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
12 deletions
+48
-12
builder/amazon/common/step_run_source_instance.go
builder/amazon/common/step_run_source_instance.go
+1
-1
website/source/docs/builders/amazon-ebs.html.markdown
website/source/docs/builders/amazon-ebs.html.markdown
+24
-5
website/source/docs/builders/amazon-instance.html.markdown
website/source/docs/builders/amazon-instance.html.markdown
+23
-6
No files found.
builder/amazon/common/step_run_source_instance.go
View file @
5e786e3b
...
@@ -245,7 +245,7 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
...
@@ -245,7 +245,7 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
}
}
latestInstance
,
err
:=
WaitForState
(
&
stateChange
)
latestInstance
,
err
:=
WaitForState
(
&
stateChange
)
if
err
!=
nil
{
if
err
!=
nil
{
err
:=
fmt
.
Errorf
(
"Error waiting for instance (%s) to become ready: %s"
,
*
s
.
instance
.
InstanceID
,
err
)
err
:=
fmt
.
Errorf
(
"Error waiting for instance (%s) to become ready: %s"
,
instanceId
,
err
)
state
.
Put
(
"error"
,
err
)
state
.
Put
(
"error"
,
err
)
ui
.
Error
(
err
.
Error
())
ui
.
Error
(
err
.
Error
())
return
multistep
.
ActionHalt
return
multistep
.
ActionHalt
...
...
website/source/docs/builders/amazon-ebs.html.markdown
View file @
5e786e3b
...
@@ -61,11 +61,26 @@ each category, the available configuration keys are alphabetized.
...
@@ -61,11 +61,26 @@ each category, the available configuration keys are alphabetized.
### Optional:
### Optional:
*
`ami_block_device_mappings`
(array of block device mappings) - Add the block
*
`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 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"
-
`device_name`
(string) – The device name exposed to the instance (for
(boolean), "encrypted" (boolean), "no
\_
device" (boolean), and "iops"
example, "/dev/sdh" or "xvdh")
(integer).
-
`virtual_name`
(string) – The virtual device name. See the documentation on
[
Block Device Mapping
][
1
]
for more information
-
`snapshot_id`
(string) – The ID of the snapshot
-
`volume_type`
(string) – The volume type. gp2 for General Purpose (SSD)
volumes, io1 for Provisioned IOPS (SSD) volumes, and standard for Magnetic
volumes
-
`volume_size`
(integer) – The size of the volume, in GiB. Required if not
specifying a
`snapshot_id`
-
`delete_on_termination`
(boolean) – Indicates whether the EBS volume is
deleted on instance termination
-
`encrypted`
(boolean) – Indicates whether to encrypt the volume or not
-
`no_device`
(boolean) – Suppresses the specified device included in the
block device mapping of the AMI
-
`iops`
(integer) – The number of I/O operations per second (IOPS) that the
volume supports. See the documentation on
[
IOPs
][
2
]
for more information
*
`ami_description`
(string) - The description to set for the resulting
*
`ami_description`
(string) - The description to set for the resulting
AMI(s). By default this description is empty.
AMI(s). By default this description is empty.
...
@@ -255,3 +270,7 @@ Here is an example using the optional AMI tags. This will add the tags
...
@@ -255,3 +270,7 @@ Here is an example using the optional AMI tags. This will add the tags
}
}
}
}
```
```
[
1
]:
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html
[
2
]:
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html
website/source/docs/builders/amazon-instance.html.markdown
View file @
5e786e3b
...
@@ -81,12 +81,26 @@ each category, the available configuration keys are alphabetized.
...
@@ -81,12 +81,26 @@ each category, the available configuration keys are alphabetized.
### Optional:
### Optional:
*
`ami_block_device_mappings`
(array of block device mappings) - Add the block
*
`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 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"
-
`device_name`
(string) – The device name exposed to the instance (for
(boolean), "encrypted" (boolean), "no
\_
device" (boolean), and "iops" (integer).
example, "/dev/sdh" or "xvdh")
See
[
amazon-ebs
](
/docs/builders/amazon-ebs.html
)
for an example template.
-
`virtual_name`
(string) – The virtual device name. See the documentation on
[
Block Device Mapping
][
1
]
for more information
-
`snapshot_id`
(string) – The ID of the snapshot
-
`volume_type`
(string) – The volume type. gp2 for General Purpose (SSD)
volumes, io1 for Provisioned IOPS (SSD) volumes, and standard for Magnetic
volumes
-
`volume_size`
(integer) – The size of the volume, in GiB. Required if not
specifying a
`snapshot_id`
-
`delete_on_termination`
(boolean) – Indicates whether the EBS volume is
deleted on instance termination
-
`encrypted`
(boolean) – Indicates whether to encrypt the volume or not
-
`no_device`
(boolean) – Suppresses the specified device included in the
block device mapping of the AMI
-
`iops`
(integer) – The number of I/O operations per second (IOPS) that the
volume supports. See the documentation on
[
IOPs
][
2
]
for more information
*
`ami_description`
(string) - The description to set for the resulting
*
`ami_description`
(string) - The description to set for the resulting
AMI(s). By default this description is empty.
AMI(s). By default this description is empty.
...
@@ -318,3 +332,6 @@ sudo -i -n ec2-upload-bundle \
...
@@ -318,3 +332,6 @@ sudo -i -n ec2-upload-bundle \
The available template variables should be self-explanatory based on the
The available template variables should be self-explanatory based on the
parameters they're used to satisfy the
`ec2-upload-bundle`
command.
parameters they're used to satisfy the
`ec2-upload-bundle`
command.
[
1
]:
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html
[
2
]:
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_EbsBlockDevice.html
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment