← 返回命令列表

Linux command

terraform-logout 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Log out

terraform logout

Log out

terraform logout [hostname]

说明

terraform logout removes locally stored API credentials for a specified remote service host. These credentials are typically stored after running terraform login. The command supports HCP Terraform, Terraform Enterprise, and any host offering Terraform services. When using the default credentials file, it removes the token for the specified hostname from ~/.terraform.d/credentials.tfrc.json. If a credentials helper is configured, Terraform invokes the helper's forget command to remove credentials from the external system.

参数

hostname
The hostname of the Terraform service to log out from. Defaults to app.terraform.io (HCP Terraform). For Terraform Enterprise, specify your organization's hostname

FAQ

What is the terraform-logout command used for?

terraform logout removes locally stored API credentials for a specified remote service host. These credentials are typically stored after running terraform login. The command supports HCP Terraform, Terraform Enterprise, and any host offering Terraform services. When using the default credentials file, it removes the token for the specified hostname from ~/.terraform.d/credentials.tfrc.json. If a credentials helper is configured, Terraform invokes the helper's forget command to remove credentials from the external system.

How do I run a basic terraform-logout example?

Run `terraform logout` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does hostname do in terraform-logout?

The hostname of the Terraform service to log out from. Defaults to app.terraform.io (HCP Terraform). For Terraform Enterprise, specify your organization's hostname