Example `.terraformrc` / `terraform.rc` credentials block.

Section: CLI Auth and Credentials

CLI credentials snippet

hcl
hcl
credentials "app.terraform.io" {
  token = var.tfc_token
}
Explanation

Example `.terraformrc` / `terraform.rc` credentials block.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing CLI Auth and Credentials
Log in to Terraform Cloud/HCP
Open a browser flow to save an API token in the CLI credentials file.
OpenIn sheetbashsame section
Log out from Terraform Cloud/HCP
Remove saved credentials for the current host.
OpenIn sheetbashsame section
Plan without color
Disable ANSI color codes for cleaner CI logs.
OpenIn sheetbash1 tag match
Remote backend with prefix
Map multiple CLI workspaces to remote workspaces with a shared prefix.
OpenIn sheethcl1 tag match
Save plan as pipeline artifact
Persist both binary and JSON plan outputs for later review or policy checks.
OpenIn sheetbash1 tag match
Apply for CI
Apply non-interactively in automation.
OpenIn sheetbash1 tag match