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
5c8d9735
Commit
5c8d9735
authored
Jun 10, 2015
by
Clint
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2201 from janschumann/ebs_volume_creation_fails_without_volume_type
EBS volume creation fails without volume type
parents
2a6c4e0d
802cfa38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
builder/amazon/common/block_device.go
builder/amazon/common/block_device.go
+1
-1
builder/amazon/common/block_device_test.go
builder/amazon/common/block_device_test.go
+17
-0
No files found.
builder/amazon/common/block_device.go
View file @
5c8d9735
...
...
@@ -35,7 +35,7 @@ func buildBlockDevices(b []BlockDevice) []*ec2.BlockDeviceMapping {
}
// IOPS is only valid for SSD Volumes
if
blockDevice
.
VolumeType
!=
"standard"
&&
blockDevice
.
VolumeType
!=
"gp2"
{
if
blockDevice
.
VolumeType
!=
"
"
&&
blockDevice
.
VolumeType
!=
"
standard"
&&
blockDevice
.
VolumeType
!=
"gp2"
{
ebsBlockDevice
.
IOPS
=
&
blockDevice
.
IOPS
}
...
...
builder/amazon/common/block_device_test.go
View file @
5c8d9735
...
...
@@ -36,6 +36,23 @@ func TestBlockDevice(t *testing.T) {
},
},
},
{
Config
:
&
BlockDevice
{
DeviceName
:
"/dev/sdb"
,
VolumeSize
:
8
,
},
Result
:
&
ec2
.
BlockDeviceMapping
{
DeviceName
:
aws
.
String
(
"/dev/sdb"
),
VirtualName
:
aws
.
String
(
""
),
EBS
:
&
ec2
.
EBSBlockDevice
{
Encrypted
:
aws
.
Boolean
(
false
),
VolumeType
:
aws
.
String
(
""
),
VolumeSize
:
aws
.
Long
(
8
),
DeleteOnTermination
:
aws
.
Boolean
(
false
),
},
},
},
{
Config
:
&
BlockDevice
{
DeviceName
:
"/dev/sdb"
,
...
...
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