Skip to content

Commit

Permalink
docs: Update documentation for environment variables to explain TF_PR…
Browse files Browse the repository at this point in the history
…ODUCT
  • Loading branch information
MatthewJohn committed Jun 5, 2024
1 parent f9d56fb commit 1af481d
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion www/docs/usage/commandline.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,36 @@ The most recently selected versions are presented at the top of the dropdown.

## Use environment variables

You can also set the `TF_VERSION` environment variable to your desired terraform version. For example:
You can also set environment variables for tfswitch to override some configurations:

### `TF_VERSION`

`TF_VERSION` environment variable can be set to your desired terraform version.

For example:

```bash
export TF_VERSION=0.14.4
tfswitch #will automatically switch to terraform version 0.14.4
```


### `TF_PRODUCT`

`TF_PRODUCT` environment variable can be set to your desired product/tool.

This can either be set to:

* `terraform`
* `opentofu`

For example:

```bash
export TF_PRODUCT=opentofu
tfswitch # Will install opentofu
```

## Install latest version only

1. Install the latest stable version only.
Expand Down

0 comments on commit 1af481d

Please sign in to comment.