mirror of https://github.com/kubernetes/kops.git
Merge pull request #8639 from hakman/delete-launch-templates
Delete launch templates when using EnableLaunchTemplates
This commit is contained in:
commit
632b426bdf
|
@ -1204,7 +1204,10 @@ func FindAutoScalingLaunchTemplateConfigurations(cloud fi.Cloud, securityGroups
|
||||||
}
|
}
|
||||||
for _, j := range req.LaunchTemplateVersions {
|
for _, j := range req.LaunchTemplateVersions {
|
||||||
// @check if the security group references the security group above
|
// @check if the security group references the security group above
|
||||||
for _, y := range j.LaunchTemplateData.SecurityGroupIds {
|
var s []*string
|
||||||
|
s = append(s, j.LaunchTemplateData.NetworkInterfaces[0].Groups...)
|
||||||
|
s = append(s, j.LaunchTemplateData.SecurityGroupIds...)
|
||||||
|
for _, y := range s {
|
||||||
if securityGroups.Has(fi.StringValue(y)) {
|
if securityGroups.Has(fi.StringValue(y)) {
|
||||||
list = append(list, &resources.Resource{
|
list = append(list, &resources.Resource{
|
||||||
Name: aws.StringValue(x.LaunchTemplateName),
|
Name: aws.StringValue(x.LaunchTemplateName),
|
||||||
|
|
Loading…
Reference in New Issue