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
13fb00b2
Commit
13fb00b2
authored
Jul 30, 2013
by
James Massara
Committed by
Mitchell Hashimoto
Jul 31, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added IAM Instance Profile support
Conflicts: builder/amazon/common/run_config.go
parent
006f0440
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
builder/amazon/common/run_config.go
builder/amazon/common/run_config.go
+1
-0
builder/amazon/common/step_run_source_instance.go
builder/amazon/common/step_run_source_instance.go
+9
-7
builder/amazon/ebs/builder.go
builder/amazon/ebs/builder.go
+1
-0
No files found.
builder/amazon/common/run_config.go
View file @
13fb00b2
...
...
@@ -10,6 +10,7 @@ import (
// AMI and details on how to access that launched image.
type
RunConfig
struct
{
SourceAmi
string
`mapstructure:"source_ami"`
IamInstanceProfile
string
`mapstructure:"iam_instance_profile"`
InstanceType
string
`mapstructure:"instance_type"`
RawSSHTimeout
string
`mapstructure:"ssh_timeout"`
SSHUsername
string
`mapstructure:"ssh_username"`
...
...
builder/amazon/common/step_run_source_instance.go
View file @
13fb00b2
...
...
@@ -12,6 +12,7 @@ type StepRunSourceInstance struct {
ExpectedRootDevice
string
InstanceType
string
SourceAMI
string
IamInstanceProfile
string
SubnetId
string
instance
*
ec2
.
Instance
...
...
@@ -24,13 +25,14 @@ func (s *StepRunSourceInstance) Run(state map[string]interface{}) multistep.Step
ui
:=
state
[
"ui"
]
.
(
packer
.
Ui
)
runOpts
:=
&
ec2
.
RunInstances
{
KeyName
:
keyName
,
ImageId
:
s
.
SourceAMI
,
InstanceType
:
s
.
InstanceType
,
MinCount
:
0
,
MaxCount
:
0
,
SecurityGroups
:
[]
ec2
.
SecurityGroup
{
ec2
.
SecurityGroup
{
Id
:
securityGroupId
}},
SubnetId
:
s
.
SubnetId
,
KeyName
:
keyName
,
ImageId
:
s
.
SourceAMI
,
InstanceType
:
s
.
InstanceType
,
MinCount
:
0
,
MaxCount
:
0
,
SecurityGroups
:
[]
ec2
.
SecurityGroup
{
ec2
.
SecurityGroup
{
Id
:
securityGroupId
}},
IamInstanceProfile
:
s
.
IamInstanceProfile
,
SubnetId
:
s
.
SubnetId
,
}
ui
.
Say
(
"Launching a source AWS instance..."
)
...
...
builder/amazon/ebs/builder.go
View file @
13fb00b2
...
...
@@ -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
,
IamInstanceProfile
:
b
.
config
.
IamInstanceProfile
,
SubnetId
:
b
.
config
.
SubnetId
,
},
&
common
.
StepConnectSSH
{
...
...
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