github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/cli/auth/index.html.md (about) 1 --- 2 layout: "docs" 3 page_title: "Authentication - Terraform CLI" 4 description: "Documentation about the login and logout commands that help automate getting an API token for your Terraform Cloud account." 5 --- 6 7 # CLI Authentication 8 9 > **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. 10 11 [Terraform Cloud](/docs/cloud/index.html) and 12 [Terraform Enterprise](/docs/enterprise/index.html) are platforms that perform 13 Terraform runs to provision infrastructure, offering a collaboration-focused 14 environment that makes it easier for teams to use Terraform together. (For 15 expediency, the content below refers to both products as "Terraform Cloud.") 16 17 Terraform CLI integrates with Terraform Cloud in several ways — it can be a 18 front-end for [CLI-driven runs](/docs/cloud/run/cli.html) in Terraform Cloud, 19 and can also use Terraform Cloud as a state backend and a private module 20 registry. All of these integrations require you to authenticate Terraform CLI 21 with your Terraform Cloud account. 22 23 The best way to handle CLI authentication is with the `login` and `logout` 24 commands, which help automate the process of getting an API token for your 25 Terraform Cloud user account. 26 27 For details, see: 28 29 - [The `terraform login` command](/docs/cli/commands/login.html) 30 - [The `terraform logout` command](/docs/cli/commands/logout.html)