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
c537623b
Commit
c537623b
authored
Jun 25, 2015
by
Jani Jappinen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing AMI snapshot tagging when copying to other regions.
parent
6bb480e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
builder/amazon/common/step_create_tags.go
builder/amazon/common/step_create_tags.go
+6
-6
No files found.
builder/amazon/common/step_create_tags.go
View file @
c537623b
...
@@ -34,8 +34,13 @@ func (s *StepCreateTags) Run(state multistep.StateBag) multistep.StepAction {
...
@@ -34,8 +34,13 @@ func (s *StepCreateTags) Run(state multistep.StateBag) multistep.StepAction {
// Declare list of resources to tag
// Declare list of resources to tag
resourceIds
:=
[]
*
string
{
&
ami
}
resourceIds
:=
[]
*
string
{
&
ami
}
regionconn
:=
ec2
.
New
(
&
aws
.
Config
{
Credentials
:
ec2conn
.
Config
.
Credentials
,
Region
:
region
,
})
// Retrieve image list for given AMI
// Retrieve image list for given AMI
imageResp
,
err
:=
ec2
conn
.
DescribeImages
(
&
ec2
.
DescribeImagesInput
{
imageResp
,
err
:=
region
conn
.
DescribeImages
(
&
ec2
.
DescribeImagesInput
{
ImageIDs
:
resourceIds
,
ImageIDs
:
resourceIds
,
})
})
...
@@ -63,11 +68,6 @@ func (s *StepCreateTags) Run(state multistep.StateBag) multistep.StepAction {
...
@@ -63,11 +68,6 @@ func (s *StepCreateTags) Run(state multistep.StateBag) multistep.StepAction {
}
}
}
}
regionconn
:=
ec2
.
New
(
&
aws
.
Config
{
Credentials
:
ec2conn
.
Config
.
Credentials
,
Region
:
region
,
})
_
,
err
=
regionconn
.
CreateTags
(
&
ec2
.
CreateTagsInput
{
_
,
err
=
regionconn
.
CreateTags
(
&
ec2
.
CreateTagsInput
{
Resources
:
resourceIds
,
Resources
:
resourceIds
,
Tags
:
ec2Tags
,
Tags
:
ec2Tags
,
...
...
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