mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 19:23:40 +00:00
Merge pull request #17649 from jtblin/jtblin/17647-aws-elb-creation-no-tags
Auto commit by PR queue bot
This commit is contained in:
commit
6be4417aff
@ -1746,12 +1746,14 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string, vpcID st
|
|||||||
tags = append(tags, tag)
|
tags = append(tags, tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
tagRequest := &ec2.CreateTagsInput{}
|
if len(tags) > 0 {
|
||||||
tagRequest.Resources = []*string{&groupID}
|
tagRequest := &ec2.CreateTagsInput{}
|
||||||
tagRequest.Tags = tags
|
tagRequest.Resources = []*string{&groupID}
|
||||||
if _, err := s.createTags(tagRequest); err != nil {
|
tagRequest.Tags = tags
|
||||||
// Not clear how to recover fully from this; we're OK because we don't match on tags, but that is a little odd
|
if _, err := s.createTags(tagRequest); err != nil {
|
||||||
return "", fmt.Errorf("error tagging security group: %v", err)
|
// Not clear how to recover fully from this; we're OK because we don't match on tags, but that is a little odd
|
||||||
|
return "", fmt.Errorf("error tagging security group: %v", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return groupID, nil
|
return groupID, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user