steampipe plugin install tfe

Table: tfe_project - Query Terraform Enterprise Projects using SQL

Terraform Cloud projects let you organize your workspaces into groups. You can structure your projects based on your organization's resource usage and ownership patterns, such as teams, business units, or services. With Terraform Cloud Standard Edition, you can give teams access to groups of workspaces using projects.

Table Usage Guide

The tfe_project table provides information about Projects within Terraform Enterprise organization. As a DevOps engineer or a system administrator, explore project's details through this table, including its ID, name and organization. Utilize it in conjunction with tfe_workspace table to improve grouping and filtering on workspaces insights.

Important Notes

  • You must specify the organization in the tfe.spc file to query this table.

Examples

List projects

Explore which projects are in the Terraform Enterprise organization.

select
id,
name,
organization,
organization_name
from
tfe_project;
select
id,
name,
organization,
organization_name
from
tfe_project;

List workspace in a specific project

Explore which workspaces belong to a specific project. This can provide an additional filtering layer to analyse relative workspaces.

select
w.name
from
tfe_workspace as w
join tfe_project as p on p.id = w.project_id
where
p.name = 'my-project';
select
w.name
from
tfe_workspace as w
join tfe_project as p on p.id = w.project_id
where
p.name = 'my-project';

Schema for tfe_project

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
idtext=ID of the project.
nametextName of the project.
organizationjsonbOrganization details that the project belongs to.
organization_nametext=, !=, ~~, ~~*, !~~, !~~*Name of the organization containing the project.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- tfe

You can pass the configuration to the command with the --config argument:

steampipe_export_tfe --config '<your_config>' tfe_project