Check if VolumeTags is empty before tagging volumes

Related to #5486
This commit is contained in:
Mark Meyer 2017-10-23 21:10:40 +02:00
parent 0a225d363a
commit 7e1646826d
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ func (s *StepRunSpotInstance) Run(state multistep.StateBag) multistep.StepAction
}
}
if len(volumeIds) > 0 {
if len(volumeIds) > 0 && len(s.VolumeTags) > 0 {
ui.Say("Adding tags to source EBS Volumes")
tags, err := ConvertToEC2Tags(s.VolumeTags, *ec2conn.Config.Region, s.SourceAMI, s.Ctx)
if err != nil {