Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default terraform path #79

Closed
odbaeu opened this issue Apr 23, 2020 · 3 comments · Fixed by #113
Closed

Default terraform path #79

odbaeu opened this issue Apr 23, 2020 · 3 comments · Fixed by #113
Assignees
Labels
new feature New feature or request

Comments

@odbaeu
Copy link

odbaeu commented Apr 23, 2020

Hello!
thank you for this awesome tool!

I struggled a bit with the default terraform path. I don't want to place it in /usr/local/bin/terraform and I don't want to add -b or --path for each call. My first try was .tfswitch.toml which solved this problem. But I also want to use version.tf. I don't want to use both version.tf and .tfswitch.toml to avoid changing the current version in two places.

Here's my current workaround. I use version.tf and in addition I created the following alias:
alias tfswitch='tfswitch -b ~/bin/tf '

Maybe you can get the terraform path from an environment variable or from a default config as described in issue #71.

Thank you!

@drdamour
Copy link

/usr/local/bin is hard for us in the ubuntu crowd

@drdamour
Copy link

another option is to put tf not to /usr/local/bin but to wherever tfswitch is by default, since i put tfswitch in ~/bin for the same reason

@warrensbox warrensbox self-assigned this Jun 1, 2020
@warrensbox warrensbox added the new feature New feature or request label Jun 1, 2020
@rust84
Copy link

rust84 commented Jun 4, 2020

Also a problem on Arch. A neat solution would be to check for a .tfswitch.toml file in the users home directory (without the version specified) and use this path as the default. I have a dozen or so terraform directories and would prefer not to create a file in each one. The alias workaround is good for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants