Terraform HCP Remote and CI Cheat Sheet/Alternate CLI config file

Use a project-specific CLI configuration in CI or containers.

Section: Remote Run Patterns

Alternate CLI config file

bash
bash
export TF_CLI_CONFIG_FILE=$PWD/.terraformrc
Explanation

Use a project-specific CLI configuration in CI or containers.

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 Remote Run Patterns
Custom TF_DATA_DIR in CI
Isolate Terraform local data in ephemeral build environments.
OpenIn sheetbashsame section
Remote backend with prefix
Map multiple CLI workspaces to remote workspaces with a shared prefix.
OpenIn sheethclsame section
Plan without color
Disable ANSI color codes for cleaner CI logs.
OpenIn sheetbash2 tag match
Save plan as pipeline artifact
Persist both binary and JSON plan outputs for later review or policy checks.
OpenIn sheetbash2 tag match
Apply for CI
Apply non-interactively in automation.
OpenIn sheetbash2 tag match
Basic validation step
Common fast feedback step before plan/apply.
OpenIn sheetbash2 tag match