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
224bb781
Commit
224bb781
authored
Jun 29, 2015
by
Anthony Spring
Committed by
Chris Bednarski
Jul 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make EBS block device mapping optional for ephemeral virtual names.
parent
f2750562
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
builder/amazon/common/block_device.go
builder/amazon/common/block_device.go
+7
-3
No files found.
builder/amazon/common/block_device.go
View file @
224bb781
...
...
@@ -4,6 +4,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/mitchellh/packer/template/interpolate"
"strings"
)
// BlockDevice
...
...
@@ -47,11 +48,14 @@ func buildBlockDevices(b []BlockDevice) []*ec2.BlockDeviceMapping {
}
mapping
:=
&
ec2
.
BlockDeviceMapping
{
EBS
:
ebsBlockDevice
,
DeviceName
:
aws
.
String
(
blockDevice
.
DeviceName
),
VirtualName
:
aws
.
String
(
blockDevice
.
VirtualName
),
}
if
!
strings
.
HasPrefix
(
blockDevice
.
VirtualName
,
"ephemeral"
)
{
mapping
.
EBS
=
ebsBlockDevice
}
if
blockDevice
.
NoDevice
{
mapping
.
NoDevice
=
aws
.
String
(
""
)
}
...
...
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