-
Notifications
You must be signed in to change notification settings - Fork 135
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
Allow fallback version #150
Comments
@johannes-mathes. Thanks for opening this issue.
And you have some places where terraform is not defined, am I correct? If the terraform version is not defined, what would you suggest |
Yes, you are right. I would think a switch -q <FALLBACK_DEFAULT_VERSION>. And by the way, your tool is very great. We use it allover our project. |
+1 for this, our use case is also running tfswitch within a pipeline. We like to specify Being that the order of precedence has environment variables prioritised last it would make sense to be able to specify 'latest' or 'latest-stable' in the |
In addition to this, I'd like the option to return an error if no valid version was found. Currently, tfswitch doesn't return 1 when you specify an invalid version, only if you specify an invalid flag. I'd like a way of using tfswitch in an automated fashion but also enforce that developers are setting versions either in their tf files or in env vars, and then error out if not.
or
|
I am still working on the Meanwhile @anherrera, I fixed your issue with release 0.12.1092: Again, I am still working on @johannes-mathes request. |
@warrensbox appreciate your swift response on this! Thank you! I'll keep an eye on this issue for the other bits :) |
We define a version requirement in most terraform modules, because we want the full control about updates. We use tfswitch also in a pipeline, without any parameter as we want to use the feature that tfswitch parses the version constraint and uses this. However, if it is not defined, tfswitch asks interactively and fails.
We would like to specify a fallback version for such a case -> no interactive questions, as this does not work in a scripted environment
The text was updated successfully, but these errors were encountered: