Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
YairSlobodin1 committed Sep 2, 2024
1 parent 010ee9d commit 524956c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/optimize/sg.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (s *SGOptimizer) Optimize() ir.OptimizeCollection {
for vpcName := range s.sgCollection.SGs {
var sg *ir.SG
var ok bool
if sg, ok = s.sgCollection.SGs[vpcName][s.sgName]; !ok && s.sgName != "" {
if sg, ok = s.sgCollection.SGs[vpcName][s.sgName]; !ok {
continue
}
reducedRules := 0
Expand All @@ -78,6 +78,7 @@ func (s *SGOptimizer) Optimize() ir.OptimizeCollection {
s.sgCollection.SGs[vpcName][s.sgName].OutboundRules = newOutboundRules
}

// print a message to the log
switch {
case reducedRules == 0:
log.Printf("no rules were reduced in sg %s", string(s.sgName))
Expand Down

0 comments on commit 524956c

Please sign in to comment.