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 thetfe.spc
file to query this table.
Examples
List projects
Explore which projects are in the Terraform Enterprise organization.
select id, name, organization, organization_namefrom tfe_project;
select id, name, organization, organization_namefrom 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.namefrom tfe_workspace as w join tfe_project as p on p.id = w.project_idwhere p.name = 'my-project';
select w.namefrom tfe_workspace as w join tfe_project as p on p.id = w.project_idwhere p.name = 'my-project';
Schema for tfe_project
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
id | text | = | ID of the project. |
name | text | Name of the project. | |
organization | jsonb | Organization details that the project belongs to. | |
organization_name | text | Name of the organization containing the project. |
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