tfctl profile profiles create
The tfctl profile profiles create command creates a new named profile.
Usage
$ tfctl profile profiles create NAME [options]
Description
The tfctl profile profiles create command creates a new named profile. By default, the newly created profile is automatically activated. Use the --no-activate flag to prevent automatic activation.
Profile names
Profile names must adhere to the following rules:
- Start with a letter a-z or A-Z.
- Contain only letters a-z, A-Z, digits 0-9, and underscores.
- Have a maximum length of 64 characters
Arguments
NAME: (Required) The name of the profile to create. Refer to Profile naming rules for more information.
Flags
--hostname=NAME: HCP Terraform or Terraform Enterprise hostname.- Optional.
- Data type: string
- Default value:
app.terraform.io
--no-activate: Disables automatic activation of the newly created profile.- Optional.
- Data type: boolean
- Default value:
false. New profiles are activated by default.
Options
All tfctl commands support options that control output formatting and CLI behavior. Refer to Global flags reference for the complete list of available options.
Examples
The following examples demonstrate how to create a new named profile.
Create a new profile
The following example creates a new profile with the specified name and activates it. Replace <PROFILE_NAME> with a valid profile name.
$ tfctl profile profiles create <PROFILE_NAME>
Create a profile for Terraform Enterprise
The following example creates a new profile with a custom hostname. Replace <PROFILE_NAME> with a valid profile name and <HOSTNAME> with a valid HCP Terraform or Terraform Enterprise hostname.
$ tfctl profile profiles create <PROFILE_NAME> --hostname <HOSTNAME>
Create a profile without activating it
The following example creates a new profile with the specified name without activating it. Replace <PROFILE_NAME> with a valid profile name.
$ tfctl profile profiles create <PROFILE_NAME> --no-activate