Skip to main content

SQL interface to your cloud resources

Project description

clquery: SQL interface to your cloud resources

One-liner

clquery allows you to perform live queries on your cloud resources, and use the power of SQL to combine and filter across multiple types of services and resources.

Install

$ virtualenv venv && source venv/bin/activate
$ pip install clquery
$ clquery
clquery> .tables

Example queries

See all AWS elastic IPs in us-west-2 region and their associated EC2 instances:

SELECT public_ip, instance_id
FROM aws_elastic_ip
WHERE region='us-west-2';

See all non-default VPCs and their CIDRs in all regions:

SELECT region, vpc_id, cidr
FROM aws_vpc
WHERE is_default is FALSE;

Find EC2 instances in us-west-2 region that have a Security Group rule that is open to the world:

SELECT
  vm.instance_id,
  sgr.ip_range,
  sgr.ip_protocol,
  sgr.from_port,
  sgr.to_port
FROM aws_ec2_instance as vm
JOIN aws_ec2_instance_security_group isg USING(instance_id)
JOIN aws_ec2_security_group_rule sgr USING(security_group_id)
WHERE vm.region='us-west-2'
  AND sgr.direction='ingress'
  AND sgr.ip_range='0.0.0.0/0';

Inspiration and reality

The goal is to support mainstream services on major cloud providers. However, it currently supports only AWS for a few services.

This project is inspired by osquery.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clquery-0.0.1rc3.tar.gz (16.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page