Table: tfe_organization_member - Query Terraform Enterprise Organization Members using SQL
Terraform Enterprise is a collaborative, scalable, and enterprise-grade version of Terraform that enables teams to work together on infrastructure as code. It provides a centralized workspace for managing Terraform runs, state, and modules, as well as access control and policy enforcement. An Organization Member in Terraform Enterprise refers to a user who is part of a specific organization, with assigned permissions and roles within that organization.
Table Usage Guide
The tfe_organization_member
table provides insights into the members of an organization within Terraform Enterprise. As a system administrator or DevOps engineer, explore member-specific details through this table, including their access levels, user details, and associated organization information. Utilize it to manage and monitor user roles and permissions within your organization, ensuring security and compliance.
Examples
List all users who are members of the organization
Discover the segments that involve all users who are part of an organization. This could be beneficial in understanding the distribution of users across different organizational structures.
select *from tfe_organization_member;
select *from tfe_organization_member;
Check two factor authentication status for each org member
Determine the status of two-factor authentication for each member of an organization. This can help enhance security by identifying members who have not yet enabled this feature.
select username, (member -> 'TwoFactor' ->> 'Enabled') :: bool as two_factor_enabledfrom tfe_organization_member;
select username, json_extract(member, '$.TwoFactor.Enabled') as two_factor_enabledfrom tfe_organization_member;
Schema for tfe_organization_member
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
text | User email. | ||
id | text | ID of the organization membership. | |
member | jsonb | Full user information for the member. | |
organization_name | text | =, !=, ~~, ~~*, !~~, !~~* | Name of the organization containing the organization member. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | Status of the membership, e.g. active. | |
user_id | text | User ID of the member. | |
username | text | Username of the member. |
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_organization_member