aws-quota-checker icon indicating copy to clipboard operation
aws-quota-checker copied to clipboard

vpc_rules_per_sg is returning incorrect count for one of the SG

Open agrevtsev opened this issue 1 year ago • 2 comments

Hi! I'm getting incorrect rules count for specific SG (according to AWS console - this group have 230 inbound, 1 outbound rule). Other SGs have (inbound+outbound)<10 and displayed correctly. Maybe it's some paging issue? I got such results on latest master, fix-cf-stack-counting branches.

Best regards!

AWS console

When checking rules count over aws cli

aws ec2 describe-security-group-rules --region us-east-1 --profile sso-prod --filter Name="group-id",Values="sg-xxxx" | jq -r '.SecurityGroupRules | length'
231

When checking rules count using aws-quota-checker

/usr/local/bin/aws-quota-checker check vpc_rules_per_sg
AWS profile: default | AWS region: us-east-1 | Active checks: vpc_rules_per_sg
Collecting checks  [####################################]  100%
Rules per VPC security group [****/us-east-1/sg-xxxx]: 66/333 ✓

agrevtsev avatar Jan 08 '23 14:01 agrevtsev