turbot/terraform

steampipe plugin install terraformsteampipe plugin install terraform

Terraform + Steampipe

A Terraform configuration file is used to declare resources, variables, modules, and more.

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

Query all resources in your Terraform files:

select
name,
type,
jsonb_pretty(arguments) as args
from
terraform_resource;
> select name, type, jsonb_pretty(arguments) as args from terraform_resource;
+------------+----------------+--------------------------------------------+
| name | type | args |
+------------+----------------+--------------------------------------------+
| app_server | aws_instance | { |
| | | "ami": "ami-830c94e3", |
| | | "tags": { |
| | | "Name": "ExampleAppServerInstance" |
| | | }, |
| | | "instance_type": "t2.micro" |
| | | } |
| app_volume | aws_ebs_volume | { |
| | | "size": 40, |
| | | "tags": { |
| | | "Name": "HelloWorld" |
| | | }, |
| | | "availability_zone": "us-west-2a" |
| | | } |
| app_bucket | aws_s3_bucket | { |
| | | "acl": "private", |
| | | "tags": { |
| | | "Name": "Test bucket", |
| | | "Environment": "Dev" |
| | | }, |
| | | "bucket": "my-app-bucket" |
| | | } |
+------------+----------------+--------------------------------------------+

Documentation

Get started

Install

Download and install the latest Terraform plugin:

steampipe plugin install terraform

Credentials

No credentials are required.

Configuration

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

connection "terraform" {
plugin = "terraform"
paths = [ "/path/to/your/files/*.tf" ]
}
  • paths - A list of directory paths to search for Terraform files. Paths may include wildcards. File matches must have the extension .tf (case insensitive).

Get involved