1/39
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No study sessions yet.
terraform init -backend-config=KEY=VALUE
Supplies backend settings at init time (repeatable), avoids hardcoding backend values in HCL.
Lists workspaces.
terraform workspace new <NAME>
terraform workspace delete <NAME>
print your Terraform outputs as machine-readable JSON instead of the pretty human format
TF_LOG_PATH
File path where Terraform writes logs (used with TF_LOG so logs go to a file instead of the terminal).
TF_VAR_<NAME>
Sets an input variable from the environment (ex: TFVARregion="us-west-2" maps to var.region).
TF_IN_AUTOMATION
Tells Terraform it’s running in CI/automation so output and prompts are automation-friendly.
TF_DATA_DIR
Changes where Terraform stores its working directory data (the .terraform directory contents).
terraform fmt -check
Validates formatting and exits with status code 3 if files are not properly formatted (useful in CI/CD)
terraform init -migrate-state
Re-initializes Terraform and migrates the existing state from the old backend to the new/changed backend configuration