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

[Feature Request] Enable getting version constraint from file #35

Open
kittydoor opened this issue Jun 11, 2024 · 1 comment
Open

[Feature Request] Enable getting version constraint from file #35

kittydoor opened this issue Jun 11, 2024 · 1 comment

Comments

@kittydoor
Copy link

steps:
- uses: opentofu/setup-opentofu@v1
  with:
    tofu_version_file: ./.opentofu-version

Example similar action: https://github.com/actions/setup-go#getting-go-version-from-the-gomod-file

At the moment, you can cat the file and write the information from a file to GITHUB_OUTPUT in one job step, and in another setup-opentofu with version by referencing that output.

It would be a lot more convenient if it was possible to setup-opentofu in a single step by giving it the file location itself. There are two ways this can work.

A. My request: Use .opentofu-version file format (or .terraform-version, see tenv)
B. Possible additional feature: Allow pointing to the file containing required_versions block (perhaps as tofu_version_block_file or something)

Option A is a lot simpler, and personally for me is all I need at the moment.
Option B sounds like a good to have, and I imagine other people might require it.

Are these two feature requests acceptable to the maintainers? If there is a (decent quality) PR will it be merged?

@cam72cam
Copy link
Member

I think we would be up for reviewing option A, thanks for proposing this!

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

No branches or pull requests

2 participants