Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
docs: Update policy documentation (#1267)
Browse files Browse the repository at this point in the history
  • Loading branch information
yevgenypats authored Jul 22, 2022
1 parent 72c2702 commit e2e1397
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions policies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,25 @@ CloudQuery SQL Policies for AWS
You can execute policies with `psql`. For example:

```bash
# Execute the whole CIS Policy
psql -U postgres -f ./cis_v1.2.0/policy.sql
# Set DSN to your PostgreSQL populated by CloudQuery
export DSN=postgres://postgres:pass@localhost:5432/postgres
# Execute CIS V1.2.0 Policy
psql ${DSN} -f ./cis_v1.2.0/policy.sql
```

This will create all the results in `aws_policy_results` table which you can query directly, connect to any BI system (Grafana, Preset, AWS QuickSight, PowerBI, ...).

You can also output it into CSV or HTML with the following built-in psql commands:

```
# Set DSN to your PostgreSQL populated by CloudQuery
export DSN=postgres://postgres:pass@localhost:5432/postgres
# default tabular output
psql -U postgres -c "select * from aws_policy_results"
psql ${DSN} -c "select * from aws_policy_results"
# CSV output
psql -U postgres -c "select * from aws_policy_results" --csv
psql ${DSN} -c "select * from aws_policy_results" --csv
# HTML output
psql -U postgres -c "select * from aws_policy_results" --html
psql ${DSN} -c "select * from aws_policy_results" --html
```

## Dashboards
Expand Down

0 comments on commit e2e1397

Please sign in to comment.