turbot/planetscale

GitHub
steampipe plugin install planetscalesteampipe plugin install planetscale

PlanetScale + Steampipe

PlanetScale is a MySQL-compatible serverless database platform.

Steampipe is an open source CLI to instantly query cloud APIs using SQL.

List databases in your PlanetScale account:

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 |
+------+-------------+---------------------------+

Documentation

Get started

Install

Download and install the latest PlanetScale plugin:

steampipe plugin install planetscale

Configuration

Installing the latest planetscale plugin will create a config file (~/.steampipe/config/planetscale.spc) with a single connection named planetscale:

connection "planetscale" {
plugin = "planetscale"
organization = "my_org"
# Required: Set your access token
# To get this token:
# 1. Install the pscale CLI
# 2. Login to the CLI
# 3. cat ~/.config/planetscale/access-token
token = "pscale_oauth_FWdKCeYK6sYQeJhNPTHRf3Ew_EXAMPLE"
}
  • organization - Organization to scope all queries to.
  • token - Access token (note: NOT a service token) from PlanetScale.

Environment variables are also available as an alternate configuration method:

  • PLANETSCALE_ORGANIZATION
  • PLANETSCALE_TOKEN

Get involved