-
Notifications
You must be signed in to change notification settings - Fork 251
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
feat: support terraform_version_file
#454
base: main
Are you sure you want to change the base?
Conversation
terraform_version_file
README.md
Outdated
|
||
If the `terraform_version_file` input is specified, the action will extract the version from the file and install it. | ||
|
||
Supported files names are `.tool-versions` or anything else. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use .terraform-version
which is a quasi-standard for Terraform: https://github.com/tfutils/tfenv?tab=readme-ov-file#terraform-version-file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean replace or anything else.
for .terraform-version
?
I think keeping compatibility with https://github.com/asdf-vm/asdf by using .tool-versions
is a good idea, for instance, some other GitHub actions use it:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Java action also supports .java-version: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md.
I think it would be good to mention .terraform-version specifically because a lot of people are probably using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, see 149638b
(#454)
Closes #298 and #208
What
Add support for
terraform_version_file
input and keep the backward compatibility to uselatest
if both inputs are set or onlyterraform_version
.Why
Take advantage of the existing tools such as https://github.com/asdf-vm/asdf
Use a similar mechanism done in some other
setup-<app
> actions.Similar PRs
I was blind, and I didn't see any references to them in the GH issues :/