@@ -1579,9 +1579,9 @@ func (s *ClusterScopeV2) findOrCreateSecurityGroupRule(ctx context.Context, secu
15791579func (s * ClusterScopeV2 ) checkSecurityGroupRuleProtocolAny (ctx context.Context , _ infrav1.VPCSecurityGroupRulePrototype , securityGroupRuleRemote infrav1.VPCSecurityGroupRuleRemote , existingRule * vpcv1.SecurityGroupRuleProtocolAny ) (bool , error ) {
15801580 log := ctrl .LoggerFrom (ctx )
15811581 if exists , err := s .checkSecurityGroupRulePrototypeRemote (ctx , securityGroupRuleRemote , existingRule .Remote ); err != nil {
1582- return false , fmt .Errorf ("error failed checking security group rule all remote: %w" , err )
1582+ return false , fmt .Errorf ("error failed checking security group rule any remote: %w" , err )
15831583 } else if exists {
1584- log .V (3 ).Info ("security group rule all protocols match " )
1584+ log .V (3 ).Info ("security group rule any protocol matches " )
15851585 return true , nil
15861586 }
15871587 return false , nil
@@ -1591,9 +1591,9 @@ func (s *ClusterScopeV2) checkSecurityGroupRuleProtocolAny(ctx context.Context,
15911591func (s * ClusterScopeV2 ) checkSecurityGroupRuleProtocolIcmpTCPUDP (ctx context.Context , _ infrav1.VPCSecurityGroupRulePrototype , securityGroupRuleRemote infrav1.VPCSecurityGroupRuleRemote , existingRule * vpcv1.SecurityGroupRuleProtocolIcmptcpudp ) (bool , error ) {
15921592 log := ctrl .LoggerFrom (ctx )
15931593 if exists , err := s .checkSecurityGroupRulePrototypeRemote (ctx , securityGroupRuleRemote , existingRule .Remote ); err != nil {
1594- return false , fmt .Errorf ("error failed checking security group rule all remote: %w" , err )
1594+ return false , fmt .Errorf ("error failed checking security group rule icmp-tcp-udp remote: %w" , err )
15951595 } else if exists {
1596- log .V (3 ).Info ("security group rule all protocols match " )
1596+ log .V (3 ).Info ("security group rule icmp-tcp-udp protocol matches " )
15971597 return true , nil
15981598 }
15991599 return false , nil
@@ -1652,9 +1652,9 @@ func (s *ClusterScopeV2) checkSecurityGroupRuleProtocolIndividual(ctx context.Co
16521652 }
16531653
16541654 if exists , err := s .checkSecurityGroupRulePrototypeRemote (ctx , securityGroupRuleRemote , existingRule .Remote ); err != nil {
1655- return false , fmt .Errorf ("error failed checking security group rule all remote: %w" , err )
1655+ return false , fmt .Errorf ("error failed checking security group rule %s remote: %w" , string ( securityGroupRulePrototype . Protocol ) , err )
16561656 } else if exists {
1657- log .V (3 ).Info ("security group rule all protocols match" )
1657+ log .V (3 ).Info ("security group rule individual protocol matches" , "protocol" , string ( securityGroupRulePrototype . Protocol ) )
16581658 return true , nil
16591659 }
16601660 return false , nil
0 commit comments