We’re happy to announce Terraform Login, a new command available in the Terraform CLI as of Terraform 0.12.21. Terraform Login, and its counterpart Terraform Logout, have been added to Terraform to simplify the connection of the Terraform CLI to Terraform Cloud.
Terraform Login will guide users through the process of obtaining a Terraform Cloud user token and configuring the Terraform CLI to connect to their workspaces.
Terraform Login will connect the Terraform remote backend to Terraform Cloud by default. It can also be used to connect to Terraform Enterprise by specifying the hostname following the login command.
Connecting to TFE example command
$ terraform login private.example.com
Terraform Login is one of the many steps we’re taking as we strengthen and streamline Terraform workflows across all our tools. For questions or suggestions concerning Terraform login, please join us in our community forum.
from Hashicorp Blog: https://www.hashicorp.com/blog/announcing-terraform-login