You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/website/docs/cli/commands/logout.mdx

40 lines
1.7 KiB

---
page_title: terraform logout command reference
description: >-
The `terraform logout` command removes credentials stored after using the terraform
login command.
---
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
> [!IMPORTANT]
> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
# `terraform logout` command
This topic provides reference information about the `terraform logout` command.
## Introduction
Use the `terraform logout` command to remove credentials stored after running the
`terraform login` command. These credentials are API tokens for HCP Terraform,
Terraform Enterprise, or any other host that offers Terraform services.
## Usage
Usage: `terraform logout [hostname]`
If you don't provide an explicit hostname, Terraform will assume you want to
log out of HCP Terraform at `app.terraform.io`.
-> **Note:** the API token is only removed from local storage, not destroyed on
the remote server, so it will remain valid until manually revoked.
## Credentials Storage
By default, Terraform will remove the token stored in plain text in a local CLI
configuration file called `credentials.tfrc.json`. If you have configured a
[credentials helper program](/terraform/cli/config/config-file#credentials-helpers), Terraform
will use the helper's `forget` command to remove it.