apply source instance default "Name" tag only if it's not provided in run_tags
This commit is contained in:
parent
36d8a1df1d
commit
a65af51a4b
|
@ -292,7 +292,9 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi
|
|||
instance := latestInstance.(*ec2.Instance)
|
||||
|
||||
ui.Say(fmt.Sprintf("Adding tags to source instance:"))
|
||||
s.Tags["Name"] = "Packer Builder"
|
||||
if _, exists := s.Tags["Name"]; !exists {
|
||||
s.Tags["Name"] = "Packer Builder"
|
||||
}
|
||||
ec2Tags := ConvertToEC2Tags(s.Tags, ui)
|
||||
|
||||
_, err = ec2conn.CreateTags(&ec2.CreateTagsInput{
|
||||
|
|
Loading…
Reference in New Issue