image

PlanetScale Plugin for Steampipe

Use SQL to query databases, logs and more from PlanetScale.

Quick start

Install the plugin with Steampipe:

steampipe plugin install planetscale

Configure the server address in ~/.steampipe/config/planetscale.spc:

connection "planetscale" {
  plugin       = "planetscale"
  organization = "my_org"
  token        = "pscale_oauth_FWdKCeYK6sYQeJhNPTHRf3Ew_EXAMPLE"
}

Run steampipe:

steampipe query

Query your databases:

select
  name,
  region_slug,
  created_at
from
  planetscale_database

+------+-------------+---------------------------+
| name | region_slug | created_at                |
+------+-------------+---------------------------+
| test | us-east     | 2021-11-16T22:31:03-05:00 |
| prod | us-west     | 2022-02-11T14:03:24-05:00 |
+------+-------------+---------------------------+

Developing

Prerequisites:

Clone:

git clone https://github.com/turbot/steampipe-plugin-planetscale.git
cd steampipe-plugin-planetscale

Build, which automatically installs the new version to your ~/.steampipe/plugins directory:

make

Configure the plugin:

cp config/* ~/.steampipe/config
vi ~/.steampipe/config/planetscale.spc

Try it!

steampipe query
> .inspect planetscale

Further reading:

Contributing

Please see the contribution guidelines and our code of conduct. All contributions are subject to the Apache 2.0 open source license.

help wanted issues:

GitHub

View Github