Skip to content

Commit

Permalink
Improve table docs (#67)
Browse files Browse the repository at this point in the history
Co-authored-by: Madhushree Ray <madhushree@turbot.com>
  • Loading branch information
misraved and madhushreeray30 authored Dec 12, 2023
1 parent 3b09a61 commit 5df87b6
Show file tree
Hide file tree
Showing 23 changed files with 1,541 additions and 108 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/steampipe-anywhere.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Release Steampipe Anywhere Components

on:
push:
tags:
- 'v*'


jobs:
anywhere_publish_workflow:
uses: turbot/steampipe-workflows/.github/workflows/steampipe-anywhere.yml@main
secrets: inherit
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ from
scaleway_account_ssh_key;
```

## Engines

This plugin is available for the following engines:

| Engine | Description
|---------------|------------------------------------------
| [Steampipe](https://steampipe.io/docs) | 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](https://steampipe.io/docs/steampipe_postgres/index) | 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](https://steampipe.io/docs//steampipe_sqlite/index) | 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](https://steampipe.io/docs/steampipe_export/index) | 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](https://turbot.com/pipes/docs) | 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:
Expand Down Expand Up @@ -69,11 +81,17 @@ Further reading:
- [Writing plugins](https://steampipe.io/docs/develop/writing-plugins)
- [Writing your first table](https://steampipe.io/docs/develop/writing-your-first-table)

## Contributing
## Open Source & Contributing

This repository is published under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) (source code) and [CC BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/2.0/) (docs) licenses. Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you!

[Steampipe](https://steampipe.io) is a product produced from this open source software, exclusively by [Turbot HQ, Inc](https://turbot.com). It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source).

## Get Involved

Please see the [contribution guidelines](https://github.com/turbot/steampipe/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/turbot/steampipe/blob/main/CODE_OF_CONDUCT.md). All contributions are subject to the [Apache 2.0 open source license](https://github.com/turbot/steampipe-plugin-scaleway/blob/main/LICENSE).
**[Join #steampipe on Slack →](https://turbot.com/community/join)**

`help wanted` issues:
Want to help but don't know where to start? Pick up one of the `help wanted` issues:

- [Steampipe](https://github.com/turbot/steampipe/labels/help%20wanted)
- [Scaleway Plugin](https://github.com/turbot/steampipe-plugin-scaleway/labels/help%20wanted)
402 changes: 402 additions & 0 deletions docs/LICENSE

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ short_name: "scaleway"
description: "Steampipe plugin to query servers, networks, databases and more from your Scaleway project."
og_description: "Query Scaleway with SQL! Open source CLI. No DB required."
og_image: "/images/plugins/turbot/scaleway-social-graphic.png"
engines: ["steampipe", "sqlite", "postgres", "export"]
---

# Scaleway + Steampipe

[Scaleway](https://www.scaleway.com) is a cloud platform, offering BareMetal and Virtual SSD Cloud Servers for any workload.

[Steampipe](https://steampipe.io) is an open source CLI to instantly query cloud APIs using SQL.
[Steampipe](https://steampipe.io) is an open-source zero-ETL engine to instantly query cloud APIs using SQL.

List VPC private networks in your Scaleway project:

Expand Down Expand Up @@ -147,11 +148,6 @@ connection "scaleway_all" {
}
```

## Get involved

- Open source: https://github.com/turbot/steampipe-plugin-scaleway
- Community: [Join #steampipe on Slack →](https://turbot.com/community/join)

## Multi-Region Connections

You may also specify one or more regions with the `regions` argument:
Expand Down
42 changes: 38 additions & 4 deletions docs/tables/scaleway_account_ssh_key.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
# Table: scaleway_account_ssh_key
---
title: "Steampipe Table: scaleway_account_ssh_key - Query Scaleway Account SSH Keys using SQL"
description: "Allows users to query Scaleway Account SSH Keys, specifically the details of each SSH key associated with the account, providing insights into key management and security."
---

SSH keys allow you to securely connect to your compute instances without using a password.
# Table: scaleway_account_ssh_key - Query Scaleway Account SSH Keys using SQL

Scaleway is a cloud computing company that provides a range of scalable computing resources, including bare metal servers, development platforms, and storage options. Among these resources, Scaleway Account SSH Keys are used to ensure secure shell access to instances. These keys are critical for maintaining the security and integrity of user data and operations within the Scaleway environment.

## Table Usage Guide

The `scaleway_account_ssh_key` table provides insights into the SSH keys associated with a Scaleway account. As a DevOps engineer, explore key-specific details through this table, including key fingerprints, creation dates, and associated metadata. Utilize it to uncover information about keys, such as their usage across instances, their creation and modification history, and the overall security posture of your Scaleway account.

## Examples

### Basic info
Explore the creation dates and unique identifiers of your Scaleway account's SSH keys. This allows you to manage and track the keys more effectively.

```sql
```sql+postgres
select
name,
id,
created_at,
fingerprint
from
scaleway_account_ssh_key;
```

```sql+sqlite
select
name,
id,
Expand All @@ -17,8 +37,9 @@ from
```

### List SSH keys older than 90 days
Discover the SSH keys that have been in use for more than 90 days. This is useful in understanding potential security risks associated with outdated keys and aids in maintaining optimal security practices.

```sql
```sql+postgres
select
name,
id,
Expand All @@ -30,3 +51,16 @@ from
where
extract(day from current_timestamp - created_at) > 90;
```

```sql+sqlite
select
name,
id,
created_at,
fingerprint,
cast((julianday('now') - julianday(created_at)) as integer) as age
from
scaleway_account_ssh_key
where
cast((julianday('now') - julianday(created_at)) as integer) > 90;
```
66 changes: 61 additions & 5 deletions docs/tables/scaleway_baremetal_server.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,36 @@
# Table: scaleway_baremetal_server
---
title: "Steampipe Table: scaleway_baremetal_server - Query Scaleway Baremetal Servers using SQL"
description: "Allows users to query Scaleway Baremetal Servers, specifically providing information about the server's status, location, and configuration."
---

A bare metal provides a dedicated server to run your applications on.
# Table: scaleway_baremetal_server - Query Scaleway Baremetal Servers using SQL

A Scaleway Baremetal Server is a physical server provided by Scaleway, a cloud computing company. These servers offer high-performance capabilities and full control over the hardware, making them ideal for compute-intensive workloads. They can be customized according to the user's needs, with a variety of CPUs, memory, and storage options available.

## Table Usage Guide

The `scaleway_baremetal_server` table offers insights into the Baremetal Servers within Scaleway. As a system administrator, you can explore server-specific details through this table, including server status, location, and configuration. Use this table to monitor the performance and health of your servers, verify their configurations, and ensure they are optimally located for their intended workloads.

## Examples

### Basic info
Explore the status and timeline of your Scaleway baremetal servers across different projects and organizations. This aids in understanding the distribution and upkeep of your servers, assisting in resource management and operational efficiency.

```sql
```sql+postgres
select
name,
id,
status,
updated_at,
created_date,
zone,
project,
organization
from
scaleway_baremetal_server;
```

```sql+sqlite
select
name,
id,
Expand All @@ -21,8 +45,9 @@ from
```

### List stopped bare metal servers
Discover the segments that include inactive bare metal servers across various zones, projects, and organizations. This can be useful for assessing resource utilization and identifying potential areas for cost savings.

```sql
```sql+postgres
select
name,
id,
Expand All @@ -36,9 +61,24 @@ where
status = 'stopped';
```

```sql+sqlite
select
name,
id,
status,
zone,
project,
organization
from
scaleway_baremetal_server
where
status = 'stopped';
```

### List bare metal servers older than 90 days
Determine the areas in which bare metal servers have been running for over 90 days. This is useful for assessing long-term usage and identifying potential areas for resource optimization.

```sql
```sql+postgres
select
name,
id,
Expand All @@ -53,3 +93,19 @@ where
state = 'running'
and extract(day from current_timestamp - created_date) > 90;
```

```sql+sqlite
select
name,
id,
status,
julianday('now') - julianday(created_date) as age,
zone,
project,
organization
from
scaleway_baremetal_server
where
state = 'running'
and julianday('now') - julianday(created_date) > 90;
```
47 changes: 42 additions & 5 deletions docs/tables/scaleway_iam_api_key.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
# Table: scaleway_iam_api_key
---
title: "Steampipe Table: scaleway_iam_api_key - Query Scaleway IAM API Keys using SQL"
description: "Allows users to query Scaleway IAM API Keys, specifically providing details about each key, including ID, state, creation and expiration dates, and associated user information."
---

API keys allow you to securely connect to scaleway console in your organization.
# Table: scaleway_iam_api_key - Query Scaleway IAM API Keys using SQL

This table requires the `organization_id` config argument to be set.
Scaleway IAM API Keys are unique identifiers associated with a Scaleway account. These keys are used to authenticate and authorize actions in the Scaleway API. They can be created, deleted, and managed through the Scaleway console or API.

## Table Usage Guide

The `scaleway_iam_api_key` table provides insights into IAM API keys within Scaleway Identity and Access Management (IAM). As a security analyst, explore key-specific details through this table, including key states, creation and expiration dates, and associated user information. Utilize it to monitor and manage the lifecycle of API keys, ensuring they are rotated regularly and expired keys are deleted, enhancing the security posture of your Scaleway environment.

**Important Notes**
- This table requires the `organization_id` config argument to be set.

## Examples

### Basic info
Explore which Scaleway IAM API keys have been created, when they were made, and their expiration dates. This allows for efficient management of API keys, ensuring none are expired or unused.

```sql
```sql+postgres
select
access_key,
created_at,
user_id,
expires_at,
default_project_id
from
scaleway_iam_api_key
```

```sql+sqlite
select
access_key,
created_at,
Expand All @@ -20,8 +42,9 @@ from
```

### List API keys older than 90 days
Determine the areas in which API keys are older than 90 days to manage and update them as necessary. This helps in maintaining security and ensuring all keys are up-to-date.

```sql
```sql+postgres
select
access_key,
created_at,
Expand All @@ -34,3 +57,17 @@ from
where
extract(day from current_timestamp - created_at) > 90;
```

```sql+sqlite
select
access_key,
created_at,
user_id,
expires_at,
default_project_id,
julianday('now') - julianday(created_at) as age
from
scaleway_iam_api_key
where
julianday('now') - julianday(created_at) > 90;
```
Loading

0 comments on commit 5df87b6

Please sign in to comment.