Skip to content

Commit bd1b727

Browse files
committed
changed sec group nil check from findSecurityGroup
1 parent 715f3b4 commit bd1b727

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pkg/providers/v1/aws_loadbalancer.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,9 +816,12 @@ func (c *Cloud) updateInstanceSecurityGroupsForNLB(ctx context.Context, lbName s
816816
{
817817
for sgID := range desiredSGIDs.Difference(sets.StringKeySet(clusterSGs)) {
818818
sg, err := c.findSecurityGroup(ctx, sgID)
819-
if err != nil || sg == nil {
819+
if err != nil {
820820
return fmt.Errorf("error finding instance group: %q", err)
821821
}
822+
if sg == nil {
823+
return fmt.Errorf("error finding security group: %s", sgID)
824+
}
822825
clusterSGs[sgID] = sg
823826
}
824827
}

0 commit comments

Comments
 (0)