Table: tfe_team - Query Terraform Enterprise Teams using SQL
Terraform Enterprise Teams are a resource within Terraform that allows you to manage and organize users into different groups. Teams provide a way to assign specific permissions and roles to a group of users, simplifying access management across the organization. They are particularly useful in large organizations where managing individual user permissions can be complex and time-consuming.
Table Usage Guide
The tfe_team
table provides insights into Teams within Terraform Enterprise. As an Infrastructure Engineer, explore team-specific details through this table, including team names, visibility settings, and user counts. Utilize it to understand team structures, manage access permissions, and streamline the organization of users within your Terraform Enterprise setup.
Examples
List teams
Explore which teams are present within your organization to understand the distribution of resources and tasks. This can help in managing your resources more efficiently by identifying any gaps or overlaps.
select *from tfe_team;
select *from tfe_team;
Teams with the most users
Discover the teams that have the highest number of users. This is useful for understanding which teams are the largest and may need additional resources or management.
select name, user_countfrom tfe_teamorder by user_count desclimit 5;
select name, user_countfrom tfe_teamorder by user_count desclimit 5;
Schema for tfe_team
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
id | text | = | ID of the team. |
name | text | Name of the team. | |
organization_access | jsonb | Organization access granted to the team. | |
organization_name | text | =, !=, ~~, ~~*, !~~, !~~* | Name of the organization containing the team. |
permissions | jsonb | Permissions granted to the team. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
user_count | bigint | Number of users in the team. | |
visibility | text | The team's visibility: secret, organization. |
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_team