github.com/hugorut/terraform@v1.1.3/website/docs/cli/auth/index.mdx (about) 1 --- 2 page_title: Authentication - Terraform CLI 3 description: >- 4 Documentation about the login and logout commands that help automate getting 5 an API token for your Terraform Cloud account. 6 --- 7 8 # CLI Authentication 9 10 > **Hands-on:** Try the [Authenticate the CLI with Terraform Cloud](https://learn.hashicorp.com/tutorials/terraform/cloud-login?in=terraform/cloud&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn. 11 12 [Terraform Cloud](/cloud) and 13 [Terraform Enterprise](/enterprise) are platforms that perform 14 Terraform runs to provision infrastructure, offering a collaboration-focused 15 environment that makes it easier for teams to use Terraform together. (For 16 expediency, the content below refers to both products as "Terraform Cloud.") 17 18 Terraform CLI integrates with Terraform Cloud in several ways — it can be a 19 front-end for [CLI-driven runs](/cloud-docs/run/cli) in Terraform Cloud, 20 and can also use Terraform Cloud as a state backend and a private module 21 registry. All of these integrations require you to authenticate Terraform CLI 22 with your Terraform Cloud account. 23 24 The best way to handle CLI authentication is with the `login` and `logout` 25 commands, which help automate the process of getting an API token for your 26 Terraform Cloud user account. 27 28 For details, see: 29 30 - [The `terraform login` command](/cli/commands/login) 31 - [The `terraform logout` command](/cli/commands/logout)