Skip to content

Latest commit

 

History

History
80 lines (59 loc) · 2.06 KB

File metadata and controls

80 lines (59 loc) · 2.06 KB
organization category icon_url brand_color display_name short_name description og_description og_image engines
Turbot
saas
/images/plugins/turbot/planetscale.svg
#8467F3
PlanetScale
planetscale
Steampipe plugin to query databases, logs and more from PlanetScale.
Query PlanetScale with SQL! Open source CLI. No DB required.
/images/plugins/turbot/planetscale-social-graphic.png
steampipe
sqlite
postgres
export

PlanetScale + Steampipe

PlanetScale is a MySQL-compatible serverless database platform.

Steampipe is an open-source zero-ETL engine 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