tfctl profile
The tfctl profile command provides subcommands for managing profile settings.
Usage
$ tfctl profile <subcommand> [options]
Description
The tfctl profile command group provides subcommands to manage the active profile's settings. Use these commands to view and modify properties such as the default organization, hostname, and authentication token for the currently active profile.
Profiles are useful when you need to manage multiple organizations or work across different instances of HCP Terraform and Terraform Enterprise. Each profile stores its own configuration, allowing you to switch contexts without reconfiguring tfctl. To learn how to manage profiles, refer to Manage tfctl profiles.
Command groups
profiles- Manage configuration profiles
Subcommands
display- Display properties for the active profileget- Get a property value for the active profileset- Set a property value for the active profileunset- Unset a property for the active profile
Available properties
You can configure the following properties for each profile:
default_organization: Default organization. When you usetfctl apiwith paths containing{organization}placeholders, tfctl uses this value automatically when you omit an organization using-p organization=VALUEfor supported commands.hostname: HCP Terraform or Terraform Enterprise hostnamename: Profile nameno_color: Iftrue, tfctl does not use color when it prints messages to stdouttelemetry: Specifies whether telemetry is enabled and if tfctl writes the output to its log. You can specifyenabled,disabled, orlog.token: The API token to use for all requests in plain text.
Examples
The following command displays all profile settings:
$ tfctl profile display
The following command sets the default organization:
$ tfctl profile set default_organization my-org