Merge pull request #8639 from hakman/delete-launch-templates

Delete launch templates when using EnableLaunchTemplates
This commit is contained in:
Kubernetes Prow Robot 2020-02-29 09:02:39 -08:00 committed by GitHub
commit 632b426bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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),