Terraform Files Query
Background
The Run Terraform Files Query Action performs Steampipe queries on Terraform file resources with a powerful and simple PostgreSQL syntax.
For example, fetching all basic info on Terraform providers can be done simply:
Get filters for each AWS EC2 AMI:
A query to list Azure storage accounts that allow public blob access:
A full description of all existing tables and official examples are provided here:
Blink’s supported Steampipe version is: v0.3.0.
Usage
Unlike other query actions in Blink, the Run Terraform Files Query is used on static files which need to be fetched and stored during the Automation’s execution before being referenced by the action using the “File Identifier” parameter. The File Identifier can be obtained by running the Create Archive action.
For example, to query data from a Terraform repository:
- Clone the repository using the Git Clone action.
- Create an archive of the repository using the Create Archive action.
- Using the Variable Picker, select the file identifier created in the previous step, and pass it as a parameter to the Run Terraform Cloud Query Action.
Action Parameters
Parameter | Description |
---|---|
SQL statement | The SQL statement we wish to use to query the resource. |
File Identifier | The identifier of a .tar.gz archive from which data will be queried. |
Output format | Representation of the output result. The possible options are “Table”, “CSV” or “JSON”. |