mirror of https://github.com/kubernetes/kops.git
Fix SecurityGroup check when there are no Network Interfaces associated with a LaunchTemplate
This commit is contained in:
parent
564547fced
commit
697f4610c6
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue