Skip to content

Commit

Permalink
Merge pull request #8666 from appvia/bugfix/aws-lt-delete-cluster
Browse files Browse the repository at this point in the history
Fix SecurityGroup check when there are no Network Interfaces associated with a LaunchTemplate
  • Loading branch information
k8s-ci-robot committed Mar 3, 2020
2 parents 564547f + 697f461 commit cb983ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/resources/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,9 @@ func FindAutoScalingLaunchTemplateConfigurations(cloud fi.Cloud, securityGroups
for _, j := range req.LaunchTemplateVersions {
// @check if the security group references the security group above
var s []*string
s = append(s, j.LaunchTemplateData.NetworkInterfaces[0].Groups...)
if len(j.LaunchTemplateData.NetworkInterfaces) > 0 {
s = append(s, j.LaunchTemplateData.NetworkInterfaces[0].Groups...)
}
s = append(s, j.LaunchTemplateData.SecurityGroupIds...)
for _, y := range s {
if securityGroups.Has(fi.StringValue(y)) {
Expand Down

0 comments on commit cb983ff

Please sign in to comment.