image

Tailscale plugin for Steampipe

Use SQL to instantly query Tailscale resources. Open source CLI. No DB required.

Quick start

Install the plugin with Steampipe:

steampipe plugin install tailscale

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

connection "tailscale" {
  plugin       = "tailscale"
  api_key      = "abcde-krSvfN1CNTRL-M67st8X5o1234567"
  tailnet_name = "example.com"
}

Run steampipe:

steampipe query

List devices which block incoming connections in your Tailscale tailnet:

select
  name,
  device.user,
  created,
  tailnet_name
from
  tailscale_device as device
where
  blocks_incoming_connections;

+------------------------------------+-----------+---------------------------+--------------+
| name                               | user      | created                   | tailnet_name |
+------------------------------------+-----------+---------------------------+--------------+
| francis-macbook-pro.turbot.com     | francis   | 2022-09-19T10:28:55+08:00 | testdo.com   |
| oneplus-nord2-5g.testdo.com        | keyma     | 2022-09-19T16:58:56+08:00 | testdo.com   |
| test-macbook-pro.testdo.com        | test      | 2022-09-19T10:27:55+08:00 | testdo.com   |
| ip-172-32-10-22.testdo.com         | steampipe | 2022-09-20T12:50:55+08:00 | testdo.com   |
+------------------------------------+-----------+---------------------------+--------------+

Developing

Prerequisites:

Clone:

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

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

make

Configure the plugin:

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

Try it!

steampipe query
> .inspect tailscale

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