From f5bf5883931b4881320cc88605bd8641ffda2c88 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Wed, 18 Jan 2017 11:34:46 -0800 Subject: [PATCH] tag all volumes --- builder/amazon/ebs/step_tag_ebs_volumes.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/builder/amazon/ebs/step_tag_ebs_volumes.go b/builder/amazon/ebs/step_tag_ebs_volumes.go index 6db6c3bb6..ee5a26bb2 100644 --- a/builder/amazon/ebs/step_tag_ebs_volumes.go +++ b/builder/amazon/ebs/step_tag_ebs_volumes.go @@ -37,10 +37,8 @@ func (s *stepTagEBSVolumes) Run(state multistep.StateBag) multistep.StepAction { tags := common.ConvertToEC2Tags(s.VolumeRunTags) _, err := ec2conn.CreateTags(&ec2.CreateTagsInput{ - Resources: []*string{ - instance.BlockDeviceMappings[0].Ebs.VolumeId, - }, - Tags: tags, + Resources: volumeIds, + Tags: tags, }) if err != nil { err := fmt.Errorf("Error tagging source EBS Volumes on %s: %s", *instance.InstanceId, err)