RQL Query - Trying to Link Security Groups that are not linked to a particular Transit Gateway ID. but getting Bad Request Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

RQL Query - Trying to Link Security Groups that are not linked to a particular Transit Gateway ID. but getting Bad Request Error

L0 Member

Trying to Join 2 API: aws-ec2-describe-security-groups & aws-vpc-transit-gateway-attachment

 

1. List of Security Groups that allow everything:

 

config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[?any((ipProtocol equals tcp or ipProtocol equals icmp or ipProtocol equals icmpv6 or ipProtocol equals udp) and (ipRanges[*] contains 0.0.0.0/0 or ipv6Ranges[*].cidrIpv6 contains ::/0))] exists) as X;

 

2. Extracting List of VPCs that dont have a particular Gateway AttachmentID:

config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-vpc-transit-gateway-attachment' AND json.rule = transitGatewayId does not contain "XXXXXXXXX" as Y;

 

final Join:

 

config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-ec2-describe-security-groups' AND json.rule = isShared is false and (ipPermissions[?any((ipProtocol equals tcp or ipProtocol equals icmp or ipProtocol equals icmpv6 or ipProtocol equals udp) and (ipRanges[*] contains 0.0.0.0/0 or ipv6Ranges[*].cidrIpv6 contains ::/0))] exists) as X; config from cloud.resource where cloud.type = 'aws' AND api.name= 'aws-vpc-transit-gateway-attachment' AND json.rule = transitGatewayId equals "XXXX" as Y; filter ' $.X.vpcId == $.Y.resourceId'; show X;

1 REPLY 1

L4 Transporter

Greetings PKota1,

 

I hope that this note finds you well! I know that it has been a while since you had posted this question but I wanted to see if you still potentially needed any help. Thank you for your time and I hope that you have a good remainder of your day.

 

Kind Regards,

J. Avery King

J. Avery King | Prisma Cloud | Customer Success Engineer
  • 2109 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!