Skip to main content

atmos terraform logout

Use this command to remove Terraform Cloud or Terraform Enterprise credentials for an Atmos component in a stack.

Terraform Only

This command is specific to Terraform and is not available in OpenTofu. OpenTofu removed Terraform Cloud integration features.

atmos terraform logout --help

Usage​

Execute the terraform logout command like this:

atmos terraform logout <component> -s <stack> [options]

This command removes locally-stored API tokens for Terraform Cloud or Terraform Enterprise.

Atmos Behavior

This is a pure passthrough command. Atmos does not perform automatic initialization or workspace management for terraform logout. The command is executed directly to manage Terraform Cloud credentials.

Examples​

Logout from Terraform Cloud​

# Logout from app.terraform.io (default)
atmos terraform logout vpc -s dev

Logout from Terraform Enterprise​

# Logout from a specific host
atmos terraform logout vpc -s dev terraform.company.com

Arguments​

component (required)

Atmos component name.

Flags​

--stack / -s (required)

Atmos stack name where the component is defined.

--skip-init (optional)

Skip running terraform init before executing the command.

atmos terraform logout vpc -s dev --skip-init
--dry-run (optional)

Show what would be executed without actually running the command.

atmos terraform logout vpc -s dev --dry-run

Native Terraform Flags​

This command supports native terraform logout flags such as Takes an optional hostname argument to specify which credentials to remove..