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
c710323f
Commit
c710323f
authored
Jul 21, 2013
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder/amazon/*: Fix failing tests from rebase of VPC
parent
f94500b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
4 deletions
+16
-4
builder/amazon/common/artifact_test.go
builder/amazon/common/artifact_test.go
+5
-2
builder/amazon/common/step_run_source_instance.go
builder/amazon/common/step_run_source_instance.go
+2
-1
builder/amazon/common/step_security_group.go
builder/amazon/common/step_security_group.go
+7
-1
builder/amazon/ebs/builder.go
builder/amazon/ebs/builder.go
+1
-0
builder/amazon/instance/builder.go
builder/amazon/instance/builder.go
+1
-0
No files found.
builder/amazon/common/artifact_test.go
View file @
c710323f
...
...
@@ -22,7 +22,10 @@ func TestArtifactId(t *testing.T) {
amis
[
"east"
]
=
"foo"
amis
[
"west"
]
=
"bar"
a
:=
&
Artifact
{
amis
,
nil
}
a
:=
&
Artifact
{
Amis
:
amis
,
}
result
:=
a
.
Id
()
assert
.
Equal
(
result
,
expected
,
"should match output"
)
}
...
...
@@ -39,7 +42,7 @@ west: bar`
amis
[
"east"
]
=
"foo"
amis
[
"west"
]
=
"bar"
a
:=
&
Artifact
{
amis
,
nil
}
a
:=
&
Artifact
{
Amis
:
amis
}
result
:=
a
.
String
()
assert
.
Equal
(
result
,
expected
,
"should match output"
)
}
builder/amazon/common/step_run_source_instance.go
View file @
c710323f
...
...
@@ -12,6 +12,7 @@ type StepRunSourceInstance struct {
ExpectedRootDevice
string
InstanceType
string
SourceAMI
string
SubnetId
string
instance
*
ec2
.
Instance
}
...
...
@@ -29,7 +30,7 @@ func (s *StepRunSourceInstance) Run(state map[string]interface{}) multistep.Step
MinCount
:
0
,
MaxCount
:
0
,
SecurityGroups
:
[]
ec2
.
SecurityGroup
{
ec2
.
SecurityGroup
{
Id
:
securityGroupId
}},
SubnetId
:
config
.
SubnetId
,
SubnetId
:
s
.
SubnetId
,
}
ui
.
Say
(
"Launching a source AWS instance..."
)
...
...
builder/amazon/common/step_security_group.go
View file @
c710323f
...
...
@@ -13,6 +13,7 @@ import (
type
StepSecurityGroup
struct
{
SecurityGroupId
string
SSHPort
int
VpcId
string
createdGroupId
string
}
...
...
@@ -35,7 +36,12 @@ func (s *StepSecurityGroup) Run(state map[string]interface{}) multistep.StepActi
ui
.
Say
(
"Creating temporary security group for this instance..."
)
groupName
:=
fmt
.
Sprintf
(
"packer %s"
,
hex
.
EncodeToString
(
identifier
.
NewUUID
()
.
Raw
()))
log
.
Printf
(
"Temporary group name: %s"
,
groupName
)
groupResp
,
err
:=
ec2conn
.
CreateSecurityGroup
(
ec2
.
SecurityGroup
{
Name
:
groupName
,
Description
:
"Temporary group for Packer"
,
VpcId
:
config
.
VpcId
})
group
:=
ec2
.
SecurityGroup
{
Name
:
groupName
,
Description
:
"Temporary group for Packer"
,
VpcId
:
s
.
VpcId
,
}
groupResp
,
err
:=
ec2conn
.
CreateSecurityGroup
(
group
)
if
err
!=
nil
{
ui
.
Error
(
err
.
Error
())
return
multistep
.
ActionHalt
...
...
builder/amazon/ebs/builder.go
View file @
c710323f
...
...
@@ -97,6 +97,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
ExpectedRootDevice
:
"ebs"
,
InstanceType
:
b
.
config
.
InstanceType
,
SourceAMI
:
b
.
config
.
SourceAmi
,
SubnetId
:
b
.
config
.
SubnetId
,
},
&
common
.
StepConnectSSH
{
SSHAddress
:
awscommon
.
SSHAddress
(
b
.
config
.
SSHPort
),
...
...
builder/amazon/instance/builder.go
View file @
c710323f
...
...
@@ -103,6 +103,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
ExpectedRootDevice
:
"instance-store"
,
InstanceType
:
b
.
config
.
InstanceType
,
SourceAMI
:
b
.
config
.
SourceAmi
,
SubnetId
:
b
.
config
.
SubnetId
,
},
&
common
.
StepConnectSSH
{
SSHAddress
:
awscommon
.
SSHAddress
(
b
.
config
.
SSHPort
),
...
...
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