_ ________ __
_| |__ / _____|\ \ / /
|_ ___\ | |___ \ \ / /
| | | ___| \ \ / /
| |___ | | \ \/ /
\______\_| \__/
Happy terraforming 😍🥂!
NOTE:
tfvshould be installedgloballyso that it can be run from anywhere on your computer.
npm install -g tfvRun with alias
npm i -g tfvtfv --helpRun with alias
tfv -hOUTPUT:
tfv <command>
Commands:
tfv install <version> [option] Install a terraform version [aliases: i]
tfv list [option] List installed or available terraform versions [aliases: ls]
tfv remove <version> Remove terraform versions from tfv store [aliases: rm]
tfv auto-switch Auto-detect and switch to your project terraform version [aliases: as]
tfv use <version> Switch to a specified terraform version
tfv apply Run terraform apply with optional file-based targets.
Accepts all terraform flags after --
Example:
tfv apply --file main.tf --file network.tf -- -auto-approve -target=<TARGET> -var="env=prod"
tfv destroy Run terraform destroy with optional file-based targets.
Accepts all terraform flags after --
Example:
tfv destroy --file main.tf --file network.tf -- -auto-approve -target=<TARGET> -var="env=prod"
tfv plan Run terraform plan with optional file-based targets.
Accepts all terraform flags after --
Example:
tfv plan --file main.tf --file network.tf -- -auto-approve -target=<TARGET> -var="env=prod"
Options:
-h, --help Show help [boolean]
-v, --version Show version number [boolean]
tfv.mp4
| Version | Description |
|---|---|
| x.x.x | Installs terraform version x.x.x |
| x^ | Installs latest version of release x |
| x.x.^ | Installs latest version of release x.x |
| latest | Installs latest version of terraform |
tfv install <version>Run with option
tfv install <version> --arch <system-architecture>EXAMPLE:
tfv install 1.5.7 -arch amd64NOTE: The default system-architecture is the architecture of your computer (arm64, amd64, x64, etc...)
| Version | Description |
|---|---|
| x.x.x | use terraform version x.x.x |
| latest | use latest version of terraform |
tfv use <version>NOTE: You would get a password prompt. Accept it. This is a one-time request to set the terraform executable in your system path.
| Option | Option Alias | Description |
|---|---|---|
| Defaults to listing terraform versions installed locally (in tfv store) | ||
--local |
-l |
Lists all terraform versions installed locally |
--remote |
-r |
Lists all terraform versions available remotely, on terraform server |
tfv list [option]Run with alias
tfv ls [option]Remove terraform versions managed by tfv
tfv remove <versions>Run with alias
tfv rm <versions>Example
tfv rm x.y.z z.x.yAuto-detects your project terraform version, downloads it if it's not in tfv store, and switch to the version
tfv auto-switchRun with alias
tfv asRun terraform plan with optional file-based targets. Parses terraform files to extract resources, data sources, and modules as targets.
tfv plan --file main.tfWith multiple files
tfv plan --file main.tf --file network.tfWith extra terraform flags
tfv plan --file main.tf -- -var="env=prod" -out=plan.outRun terraform apply with optional file-based targets.
tfv apply --file main.tfWith auto-approve
tfv apply --file main.tf -- -auto-approveRun terraform destroy with optional file-based targets.
tfv destroy --file main.tfWith auto-approve
tfv destroy --file main.tf -- -auto-approve