steampipe plugin install tfe

Table: tfe_current_user - Query Terraform Enterprise Current User using SQL

Terraform Enterprise is an advanced version of Terraform that provides collaboration and governance features. It acts as a shared platform for teams to collaborate on infrastructure as code, providing a workspace for sharing and storing Terraform configurations. It also includes a private registry for sharing Terraform modules.

Table Usage Guide

The tfe_current_user table provides insights into the authenticated users within Terraform Enterprise. As a system administrator, you can explore user-specific details through this table, including user's ID, username, email, and other associated metadata. Utilize it to uncover information about users, such as their verification status, two-factor authentication status, and whether they are a site administrator.

Examples

Get user information

Explore your current user profile details in Terraform Enterprise. This could be useful for auditing or troubleshooting purposes.

select
*
from
tfe_current_user;
select
*
from
tfe_current_user;

Check if this is a service account

Determine if the current user is a service account. This is useful for managing user access and identifying potential security risks.

select
username,
is_service_account
from
tfe_current_user;
select
username,
is_service_account
from
tfe_current_user;

Schema for tfe_current_user

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
avatar_urltextURL of the user avatar.
emailtextUser email address.
idtextID of the user.
is_service_accountbooleanTrue if the user is a service account.
organization_nametext=, !=, ~~, ~~*, !~~, !~~*Name of the organization containing the organization member.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
two_factorjsonbDetails of two factor authentication for the user.
unconfirmed_emailtextUnconfirmed email address for the user.
usernametextUsername of the user.
v2_onlybooleanIf true, the user can only use v2.

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_current_user