Terraform¶
Shell Functions¶
Helper functions expect this directory structure per stack:
Initialize¶
Runs terraform init -reconfigure -backend-config=environments/dev.s3.tfbackend.
Plan¶
Runs terraform plan -var-file environments/dev.tfvars.
Apply¶
Destroy¶
Clean Up¶
Removes .terraform.lock.hcl and .terraform/ directories from the current tree.
Aliases¶
| Alias | Command |
|---|---|
tf |
terraform |
tffmt |
terraform fmt -recursive |
Provider Cache¶
Terraform providers are cached globally to avoid re-downloading:
Prompt Integration¶
Starship shows the current Terraform workspace and version in the prompt when you're in a directory with .tf files.