Terraform
Installs Terraform from HashiCorp's own package sources.
Demo

What it does
- Adds the HashiCorp GPG key and apt repository, then installs
terraformvia apt - On macOS, installs
terraformfrom thehashicorp/tapHomebrew tap - Upgrades only under
dotpro apply --upgrade; a normal apply leaves the installed version alone - Registers
terraformin~/.versions.d/soversionsreports its version - Installs shell aliases, with tab completion over workspace names for
workspace
Aliases
Rendered to ~/.profile.d/aliases/terraform.sh; override terraform_aliases to add or change them. The workspace alias tab-completes existing workspace names (from terraform workspace list).
| Alias | Command | Description |
|---|---|---|
plan | terraform plan | Run a plan |
apply | terraform apply | Apply changes |
workspaces | terraform workspace list | List workspaces |
workspace | terraform workspace select | Switch workspace |
tfi | terraform init | Initialise working directory |
tfp | terraform plan | Short alias for plan |
tfa | terraform apply | Short alias for apply |
Enable either this role or opentofu, not both on one host: the two share the generic plan, apply, and workspace alias names.