mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 11:38:15 +00:00
Fix #17647 - AWS add tag to SG only if existing tag
This commit is contained in:
parent
147b6911f5
commit
4a01539ded
@ -1552,6 +1552,7 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string, vpcID st
|
||||
tags = append(tags, tag)
|
||||
}
|
||||
|
||||
if len(tags) > 0 {
|
||||
tagRequest := &ec2.CreateTagsInput{}
|
||||
tagRequest.Resources = []*string{&groupID}
|
||||
tagRequest.Tags = tags
|
||||
@ -1559,6 +1560,7 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string, vpcID st
|
||||
// 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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user