From 9638a30d35a36261f7b4ca507b8b0cff4f1b1e70 Mon Sep 17 00:00:00 2001 From: Mark Peek Date: Wed, 7 Aug 2013 19:37:41 -0700 Subject: [PATCH] builder/amazon/all: address feedback for ami tag refactoring change Use explicit name for Tag field and note tags added in the ui. --- builder/amazon/common/step_create_tags.go | 1 + builder/amazon/ebs/builder.go | 2 +- builder/amazon/instance/builder.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/builder/amazon/common/step_create_tags.go b/builder/amazon/common/step_create_tags.go index c2b6371ee..ecebfad74 100644 --- a/builder/amazon/common/step_create_tags.go +++ b/builder/amazon/common/step_create_tags.go @@ -22,6 +22,7 @@ func (s *StepCreateTags) Run(state map[string]interface{}) multistep.StepAction var ec2Tags []ec2.Tag for key, value := range s.Tags { + ui.Message(fmt.Sprintf("Adding tag: \"%s\": \"%s\"", key, value)) ec2Tags = append(ec2Tags, ec2.Tag{key, value}) } diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go index cd5ba1452..5a9ae90ca 100644 --- a/builder/amazon/ebs/builder.go +++ b/builder/amazon/ebs/builder.go @@ -111,7 +111,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &common.StepProvision{}, &stepStopInstance{}, &stepCreateAMI{}, - &awscommon.StepCreateTags{b.config.Tags}, + &awscommon.StepCreateTags{Tags: b.config.Tags}, } // Run! diff --git a/builder/amazon/instance/builder.go b/builder/amazon/instance/builder.go index 3517553c3..c0a5da986 100644 --- a/builder/amazon/instance/builder.go +++ b/builder/amazon/instance/builder.go @@ -177,7 +177,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe &StepBundleVolume{}, &StepUploadBundle{}, &StepRegisterAMI{}, - &awscommon.StepCreateTags{b.config.Tags}, + &awscommon.StepCreateTags{Tags: b.config.Tags}, } // Run!