terraform login

The command that obtains an HCP Terraform API token and saves it in the CLI credentials file.

In more detail

It opens a browser to create a token for app.terraform.io, or for another hostname you name, and stores it in your home directory. Without a token, terraform init on a configuration with a cloud block stops and suggests running it. Pipelines usually supply a team token through an environment variable instead.

Examples

terraform login
terraform login tfe.example.com

Related terms

Taught in

References

Certification courses