• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H21-Nov-2021-218186

cmd/H21-Nov-2021-841672

deploy/H21-Nov-2021-478405

docs/images/H21-Nov-2021-

internal/H21-Nov-2021-766586

pkg/H21-Nov-2021-11,5179,663

vendor/H03-May-2022-10,257,0877,076,366

.gitignoreH A D21-Nov-2021219 2221

.golangci.ymlH A D21-Nov-2021768 4541

.goreleaser.yamlH A D21-Nov-20212.2 KiB8382

CHANGELOG.mdH A D21-Nov-20211,013 2415

CODE_OF_CONDUCT.mdH A D21-Nov-2021142 32

Dockerfile.goreleaserH A D21-Nov-202180 44

LICENSEH A D21-Nov-202115.6 KiB355256

MakefileH A D21-Nov-2021651 3427

README.mdH A D21-Nov-20215.2 KiB14395

go.modH A D21-Nov-20215.3 KiB125120

go.sumH A D21-Nov-2021175.7 KiB1,8101,809

main.goH A D21-Nov-2021297 1814

README.md

1<p align="center">
2<a href="https://cloudquery.io">
3<img alt="cloudquery logo" width=75% src="https://github.com/cloudquery/cloudquery/raw/main/docs/images/logo.png" />
4</a>
5</p>
6
7The open-source cloud asset inventory powered by SQL.
8
9![BuildStatus](https://img.shields.io/github/workflow/status/cloudquery/cloudquery/test?style=flat-square)
10![License](https://img.shields.io/github/license/cloudquery/cloudquery?style=flat-square)
11
12CloudQuery extracts, transforms, and loads your cloud assets into [normalized](https://hub.cloudquery.io) PostgreSQL tables. CloudQuery enables you to assess, audit, and monitor the configurations of your cloud assets.
13
14CloudQuery key use-cases and features:
15
16- **Search**: Use standard SQL to find any asset based on any configuration or relation to other assets.
17- **Visualize**: Connect CloudQuery standard PostgreSQL database to your favorite BI/Visualization tool such as Grafana, QuickSight, etc...
18- [**Policy-as-Code**](https://docs.cloudquery.io/docs/cli/getting-started#policy-command): Codify your security & compliance rules with SQL as the query engine.
19
20### Links
21
22- Homepage: https://cloudquery.io
23- Releases: https://github.com/cloudquery/cloudquery/releases
24- Documentation: https://docs.cloudquery.io
25- Hub (Provider and schema docs): https://hub.cloudquery.io/
26
27### Supported providers (Actively expanding)
28
29Checkout https://hub.cloudquery.io
30
31If you want us to add a new provider or resource please open an [Issue](https://github.com/cloudquery/cloudquery/issues).
32
33See [docs](https://docs.cloudquery.io/docs/developers/developing-new-provider) for developing new provider.
34
35## Download & install
36
37You can download the precompiled binary from [releases](https://github.com/cloudquery/cloudquery/releases), or using CLI:
38
39```shell script
40export OS=Darwin # Possible values: Linux,Windows,Darwin
41curl -L https://github.com/cloudquery/cloudquery/releases/latest/download/cloudquery_${OS}_x86_64 -o cloudquery
42chmod a+x cloudquery
43./cloudquery --help
44
45# if you want to download a specific version and not latest use the following endpoint
46export VERSION= # specifiy a version
47curl -L https://github.com/cloudquery/cloudquery/releases/download/${VERSION}/cloudquery_${OS}_x86_64 -o cloudquery
48```
49
50Homebrew
51
52```shell script
53brew install cloudquery/tap/cloudquery
54# After initial install you can upgrade the version via:
55brew upgrade cloudquery
56```
57
58## Quick Start
59
60### Running
61
62First generate a `config.hcl` file that will describe which resources you want cloudquery to pull, normalize
63and transform resources to the specified SQL database by running the following command:
64
65```shell script
66cloudquery init aws # choose one or more from: [aws azure gcp okta]
67# cloudquery init gcp azure # This will generate a config containing gcp and azure providers
68# cloudquery init --help # Show all possible auto generated configs and flags
69```
70
71Once your `config.hcl` is generated run the following command to fetch the resources:
72
73```shell script
74# you can spawn a local postgresql with docker
75# docker run -p 5432:5432 -e POSTGRES_PASSWORD=pass -d postgres
76cloudquery fetch --dsn "postgres://postgres:pass@localhost:5432/postgres?sslmode=disable"
77# cloudquery fetch --help # Show all possible fetch flags
78```
79
80Using `psql -h localhost -p 5432 -U postgres -d postgres`
81
82```shell script
83postgres=# \dt
84                                    List of relations
85 Schema |                            Name                             | Type  |  Owner
86--------+-------------------------------------------------------------+-------+----------
87 public | aws_autoscaling_launch_configuration_block_device_mapping   | table | postgres
88 public | aws_autoscaling_launch_configurations                       | table | postgres
89```
90
91Run the following example queries from `psql` shell
92
93List ec2_images
94
95```sql
96SELECT * FROM aws_ec2_images;
97```
98
99Find all public facing AWS load balancers
100
101```sql
102SELECT * FROM aws_elbv2_load_balancers WHERE scheme = 'internet-facing';
103```
104
105#### Running CloudQuery Policies
106
107CloudQuery comes with out-of-the-box [policies](https://hub.cloudquery.io/policies) which you can use as is or modify to fit your use-case.
108
109For example, to run [AWS CIS](https://hub.cloudquery.io/policies/cloudquery/aws-cis-1.20/latest) policies enter the following commands (make sure you fetched all the resources beforehand by the `fetch` command):
110
111```shell script
112./cloudquery policy run aws-cis-1.2.0
113```
114
115Full Documentation, resources and SQL schema definitions are available [here](https://hub.cloudquery.io).
116
117### Providers Authentication
118
119See additional documentation for each provider at [https://hub.cloudquery.io](https://hub.cloudquery.io).
120
121## Compile and run
122
123```
124go build .
125./cloudquery # --help to see all options
126```
127
128## Running on AWS (Lambda, Terraform)
129
130Checkout [cloudquery/terraform-aws-cloudquery](https://github.com/cloudquery/terraform-aws-cloudquery)
131
132## License
133
134By contributing to cloudquery you agree that your contributions will be licensed as defined on the LICENSE file.
135
136## Hiring
137
138If you are into Go, Backend, Cloud, GCP, AWS - ping us at jobs [at] our domain
139
140## Contribution
141
142Feel free to open Pull-Request for small fixes and changes. For bigger changes and new providers please open an issue first to prevent double work and discuss relevant stuff.
143