Skip to content

Commit 6101b02

Browse files
authored
Merge pull request #1030 from M00nF1sh/fix_sg
fix sg rule handling bug when scale down to 0 under ip mode
2 parents 963ec65 + 265a690 commit 6101b02

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/alb/sg/instance_attachment_v2.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ func (c *instanceAttachmentControllerV2) findInstanceSGsForTgGroup(ctx context.C
106106
sgIDs.Insert(aws.StringValue(group.GroupId))
107107
}
108108
}
109+
if len(sgIDs) == 0 {
110+
return nil, nil
111+
}
109112
sgs, err := c.cloud.DescribeSecurityGroups(ctx, &ec2.DescribeSecurityGroupsInput{
110113
GroupIds: aws.StringSlice(sgIDs.List()),
111114
})

0 commit comments

Comments
 (0)