OpenTofu
Installs OpenTofu (tofu) and configures shell aliases.
What it does
- Auto-installs and updates OpenTofu to the latest GitHub release via the official installer script
- Registers
opentofuin~/.versions.d/soversionsreports its version - Shell aliases for common Tofu operations
Variables
| Variable | Default | Description |
|---|---|---|
opentofu_version | latest | Pin OpenTofu to an exact version, or track the newest release |
Aliases
| Alias | Command | Description |
|---|---|---|
opentofu | tofu | Alias for the tofu binary |
plan | tofu plan | Run a plan |
apply | tofu apply | Apply changes |
workspaces | tofu workspace list | List workspaces |
workspace | tofu workspace select | Switch workspace |
tfi | tofu init | Initialise working directory |
tfp | tofu plan | Short alias for plan |
tfa | tofu apply | Short alias for apply |
The workspace alias tab-completes existing workspace names (from tofu workspace list).