ernw/openstack
steampipe plugin install ernw/openstack

OpenStack + Steampipe

OpenStack is the most widely deployed open source cloud software in the world.

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

For example:

select
name,
description,
email,
enabled
from
openstack_user;
+-------------------+---------------------------+-----------------------------+---------+
| name | description | email | enabled |
+-------------------+---------------------------+-----------------------------+---------+
| demo | This is the demo user | demo@example.com | true |
| admin | This is the admin user | admin@testproject.com | true |
| reader | This is the readonly user | reader@testproject.com | true |
+-------------------+---------------------------+-----------------------------+---------+

Documentation

Get started

Install

Download and install the latest OpenStack plugin:

steampipe plugin install ernw/openstack

Credentials

ItemDescription
CredentialsGet credentials from your OpenStack deployment.
Resolution1. Credentials explicitly set in a Steampipe config file (~/.steampipe/config/openstack.spc).
2. Credentials specified in environment variables.

Configuration

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

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

connection "openstack" {
plugin = "ernw/openstack"
# The HTTP endpoint is REQUIRED to work with the Identity API of the appropriate version.
# Can also be set with the environment variable "OS_AUTH_URL"
# identity_endpoint = "http://example.com/identity/v3"
# Username is REQUIRED if using Identity V2 API.
# For Identity V3, either UserID or a combination of Username and DomainID or DomainName is REQUIRED.
# Can also be set with the environment variable "OS_USERNAME" and "OS_USER_ID"
# username = "admin"
# user_id = "d8e8fca2dc0f896fd7cb4cb0031ba249"
# Password is REQUIRED and specifies the password of the user.
# Can also be set with the environment variable "OS_PASSWORD"
# password = "changeme"
# Passcode is OPTIONAL and used in TOTP authentication method.
# Can also be set with the environment variable "OS_PASSCODE"
# passcode = "123456"
# At most one of DomainID and DomainName is REQUIRED if using Username with Identity V3.
# Otherwise, either are OPTIONAL.
# Can also be set with the environment variable "OS_DOMAIN_ID" and "OS_DOMAIN_NAME"
# domain_id = "default"
# domain_name = "Default"
# The ProjectId or ProjectName is REQUIRED for Identity V3.
# Some providers REQUIRE both.
# Can also be set with the environment variable "OS_PROJECT_ID" and "OS_PROJECT_NAME".
# project_id = "3e666015f769bf30cda73a1a1e9b794a"
# project_name = "my_project"
# AllowReauth should be set to true if you want to cache your credentials
# in memory, and to allow attempts to re-authenticate automatically if/when your token
# expires. This setting is OPTIONAL and defaults to false.
# allow_reauth = false
# Region specifies the endpoints geographic region. Required only for services that span
# multiple regions. Can also be set with the environment variable "OS_REGION".
# region = "RegionOne"
# Further information: https://docs.openstack.org/python-openstackclient/latest/cli/authentication.html
}

Alternatively, you can also use the standard OpenStack environment variables to obtain credentials only if other arguments (identity_endpoint, username, user_id, password, passcode, domain_id, domain_name, project_id, project_name or region) are not specified in the connection:

export OS_AUTH_URL=http://example.com/identity/v3
export OS_USERNAME=admin
export USER_ID=d8e8fca2dc0f896fd7cb4cb0031ba249
export OS_PASSWORD=changeme
export OS_PASSCODE=123456
export OS_DOMAIN_ID=default
export OS_DOMAIN_NAME=Default
export OS_PROJECT_ID=3e666015f769bf30cda73a1a1e9b794a
export OS_PROJECT_NAME=my_project
export OS_REGION=RegionOne

Get involved