Skip to content

Latest commit

 

History

History
113 lines (89 loc) · 4.87 KB

index.md

File metadata and controls

113 lines (89 loc) · 4.87 KB
organization category icon_url brand_color display_name short_name description og_description og_image
Turbot
software development
/images/plugins/turbot/awscfn.svg
#FF9900
AWS CloudFormation
awscfn
Steampipe plugin to query data from AWS CloudFormation template files.
Query AWS CloudFormation template files with SQL! Open source CLI. No DB required.
/images/plugins/turbot/awscfn-social-graphic.png

AWS CloudFormation + Steampipe

An AWS CloudFormation template 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 AWS CloudFormation files:

select
  name,
  type,
  jsonb_pretty(properties) as properties
from
  awscfn_resource;
+------------+------------------+---------------------------------------+
| name       | type             | properties                            |
+------------+------------------+---------------------------------------+
| CFNUser    | AWS::IAM::User   | {                                     |
|            |                  |     "Path": "/steampipe/"             |
|            |                  | }                                     |
| DevBucket  | AWS::S3::Bucket  | {                                     |
|            |                  |     "BucketName": "TestWebBucket",    |
|            |                  |     "AccessControl": "PublicRead",    |
|            |                  |     "WebsiteConfiguration": {         |
|            |                  |         "IndexDocument": "index.html" |
|            |                  |     }                                 |
|            |                  | }                                     |
| TestVolume | AWS::EC2::Volume | {                                     |
|            |                  |     "Iops": 100,                      |
|            |                  |     "Size": 100,                      |
|            |                  |     "Tags": [                         |
|            |                  |         {                             |
|            |                  |             "Key": "poc",             |
|            |                  |             "Value": "turbot"         |
|            |                  |         }                             |
|            |                  |     ],                                |
|            |                  |     "Encrypted": false,               |
|            |                  |     "VolumeType": "io1",              |
|            |                  |     "AutoEnableIO": false,            |
|            |                  |     "AvailabilityZone": "",           |
|            |                  |     "MultiAttachEnabled": false       |
|            |                  | }                                     |
+------------+------------------+---------------------------------------+

Documentation

Get started

Install

Download and install the latest AWS CloudFormation plugin:

steampipe plugin install awscfn

Credentials

No credentials are required.

Configuration

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

connection "awscfn" {
  plugin = "awscfn"

  # Paths is a list of locations to search for CloudFormation template files
  # All paths are resolved relative to the current working directory (CWD)
  # Wildcard based searches are supported, including recursive searches

  # For example:
  #  - "*.template" matches all CloudFormation template files in the CWD
  #  - "**/*.template" matches all CloudFormation template files in the CWD and all sub-directories
  #  - "../*.template" matches all CloudFormation template files in the CWD's parent directory
  #  - "ELB*.template" matches all CloudFormation template files starting with "ELB" in the CWD
  #  - "/path/to/dir/*.template" matches all CloudFormation template files in a specific directory
  #  - "/path/to/dir/main.template" matches a specific file

  # If paths includes "*", all files (including non-CloudFormation template files) in
  # the CWD will be matched, which may cause errors if incompatible file types exist

  # Defaults to CWD
  paths = ["*.template", "*.yaml", "*.yml", "*.json"]
}
  • paths - A list of directory paths to search for AWS CloudFormation template files. Paths are resolved relative to the current working directory. Paths may include wildcards and also support ** for recursive matching. Defaults to the current working directory.

Get involved