Announcement

Dashboards as Code with HCL + SQL

Now you can visualize your queries, and easily build your own dashboards based on our library of examples.

Steampipe Team
7 min. read - Mar 10, 2022
Now you can visualize your queries, and easily build your own dashboards based on our library of examples.

What is Steampipe?

→ Query cloud APIs.
→ Visualize queries on dashboards.
→ Run compliance controls and benchmarks.
→ Blazing fast multi-threaded Golang CLI.
→ Connect anything to the embedded PostgreSQL.
steampipe cli
>
select
region,
instance_state as state,
instance_type as type
from
aws_ec2_instance;
+-----------+---------+-----------+
| region    | state   | type      |
+-----------+---------+-----------+
| eu-west-1 | running | t3.medium |
| eu-west-2 | running | m5a.large |
| us-east-1 | running | t3.large  |
+-----------+---------+-----------+
        

Introducing Steampipe Dashboards

The Steampipe hub now hosts plugins that map 67 APIs to 1,247 Postgres foreign tables. Things you can do with these tables:

  • Query APIs instantly with SQL.

  • Check your infrastructure for compliance with security frameworks.

  • Use and extend our vast library of queries, controls, and benchmarks.

  • Visualize query results using any Postgres-compatible dashboard: Grafana, Metabase, etc.

Now, with Steampipe Dashboards, you can visualize your queries with Steampipe too. Here's what that looks like.

Dashboards as code

Steampipe mods encapsulate named resources, written in HCL, of type query, control, and benchmark. In v0.13 this security-as-code approach expands to include dashboards-as-code. Dashboards use query resources too, and with this release we're adding 600 new ones. But dashboards also use new resource types:

  • Card: Show a single value (count of S3 buckets) optionally styled like controls (OK, Alert).

  • Chart: Visualize a query using types bar, column, donut, line, pie.

  • Container: Group related items and control their layout.

  • Flow: Visualize tree-structured data.

  • Image: Show an image from an URL.

  • Input: Receive user input via select or multiselect widgets.

  • Table: Display query results in an HTML table.

  • Text: Display Markdown or raw text.

All these components can use static data but, typically and much more powerfully, they can source data from named or inline SQL queries. And when you write dashboards using HCL + SQL, in your favorite code editor, you see results immediately.

Remixable dashboards

In v0.11 we made mods composable. You can, for example, write a custom mod that refers to resources defined in an existing mod such as AWS Compliance.

v0.13 extends that model to dashboards. Each type of dashboard component can be used standalone, or as a base element that can be extended with variations. That means you can customize the new dashboard mods we're delivering today, AWS Insights and OCI Insights, by cherrypicking and rearranging their charts and tables. And you can augment your custom mods with components that inherit from those we provide, or with new ones you create from scratch.

The AWS Insights mod, for example, defines 78 dashboards. Our hub documentation list the questions answered by each dashboard, and the queries used to answer those questions. Click on any query to see the plugins and tables it uses, the SQL it runs, and the dashboards that use it.

Dashboards for live data

Steampipe isn't a data warehouse or lake. Yes, it embeds Postgres, and you can augment live API queries with data that you cache in tables and views. But Steampipe shines brightest when used to answer the question "What's happening right now?" in complex heterogenous cloud infrastructures.

An automotive dashboard displays your car's changing environment in realtime. Steampipe queries and controls have always delivered live views of your cloud infrastructure. Now you can visualize that live data on dashboards.

These code-forward dashboards are ready to participate in the ecosystem of open source IaC tools and components. We provide hundreds of examples for you to use, study, and remix. Give Steampipe Dashboards a try, check out our tutorial on writing dashboards, tell us what you think, and show us your own dashboards!

Let’s get building!

Steampipe delivers tools to build, execute, and visualize and share cloud configuration, compliance, and security frameworks using HCL + SQL and a little elbow grease. To support those tools, it maps a growing suite of APIs to tables that you can query, and join across, in Postgres.

Do you want to help us expand the open source documentation and control coverage for CIS, PCI, HIPAA, and NIST? Add tables to existing plugins? Create plugins to bring new APIs into the mix? Create dashboards to visualize those APIs? The best way to get started is to join our Slack workspace and raise your hand. We would love to talk to you!

For even more good stuff in v0.13.0, check out the full release notes on GitHub.