/steampipe-plugin-aiven

Use SQL to instantly query Aiven accounts, projects, teams, users & more. Open source CLI. No DB required.

Primary LanguageGoApache License 2.0Apache-2.0

image

Aiven Plugin for Steampipe

Use SQL to query projects, services, integration endpoints and more from Aiven.

Quick start

Download and install the latest Aiven plugin:

steampipe plugin install aiven

Configure your credentials and config file.

Configuring Aiven Credentials

Configure your account details in ~/.steampipe/config/aiven.spc:

You may specify the API key to authenticate:

  • api_key: Specify the authentication token.
connection "aiven" {
  plugin   = "aiven"
  api_key  = "oGAxUvrjAdL3QBhWnaJI67Pc9P0rPDzDfhykzVfBYPlmvVH8WdJMKaeVKzcrl4CnyXpjiaKJCCNT+OkbpxfWdDNqwZPngS"
}

or you may specify the email ID and password to authenticate:

  • email: Specify the aiven email.
  • password: Specify the aiven password.
connection "aiven" {
  plugin   = "aiven"
  email    = "test@turbot.com"
  password = "turbot@123"
}

or through environment variables

export AIVEN_TOKEN="oGAxUvrjAdL3QBhWnaJI67Pc9P0rPDzDfhykzVfBYPlmvVH8WdJMKaeVKzcrl4Cny"

or through the active credentials from the Aiven CLI. You can run avn user login to set up these credentials.

connection "aiven" {
  plugin = "aiven"
}

Run steampipe:

steampipe query

List your Aiven accounts:

select
  id,
  name,
  billing_enabled,
  tenant_id
from
  aiven_account;
+--------------+-------------+-----------------+-----------+
| id           | name        | billing_enabled | tenant_id |
+--------------+-------------+-----------------+-----------+
| a41fdc9a0625 | Turbot-test | false           | aiven     |
| a41fd3d3b210 | turbot      | false           | aiven     |
+--------------+-------------+-----------------+-----------+

Engines

This plugin is available for the following engines:

Engine Description
Steampipe The Steampipe CLI exposes APIs and services as a high-performance relational database, giving you the ability to write SQL-based queries to explore dynamic data. Mods extend Steampipe's capabilities with dashboards, reports, and controls built with simple HCL. The Steampipe CLI is a turnkey solution that includes its own Postgres database, plugin management, and mod support.
Postgres FDW Steampipe Postgres FDWs are native Postgres Foreign Data Wrappers that translate APIs to foreign tables. Unlike Steampipe CLI, which ships with its own Postgres server instance, the Steampipe Postgres FDWs can be installed in any supported Postgres database version.
SQLite Extension Steampipe SQLite Extensions provide SQLite virtual tables that translate your queries into API calls, transparently fetching information from your API or service as you request it.
Export Steampipe Plugin Exporters provide a flexible mechanism for exporting information from cloud services and APIs. Each exporter is a stand-alone binary that allows you to extract data using Steampipe plugins without a database.
Turbot Pipes Turbot Pipes is the only intelligence, automation & security platform built specifically for DevOps. Pipes provide hosted Steampipe database instances, shared dashboards, snapshots, and more.

Developing

Prerequisites:

Clone:

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

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

make

Configure the plugin:

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

Try it!

steampipe query
> .inspect aiven

Further reading:

Contributing

Please see the contribution guidelines and our code of conduct. Contributions to the plugin are subject to the Apache 2.0 open source license. Contributions to the plugin documentation are subject to the CC BY-NC-ND license.

help wanted issues: