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

Option to read from a specific file for tools like tfenv, tofuenv, asdf, etc #8

Closed
nitrocode opened this issue Dec 8, 2024 · 2 comments · Fixed by #9
Closed

Option to read from a specific file for tools like tfenv, tofuenv, asdf, etc #8

nitrocode opened this issue Dec 8, 2024 · 2 comments · Fixed by #9
Assignees
Labels
enhancement New feature or request

Comments

@nitrocode
Copy link

nitrocode commented Dec 8, 2024

Related

@rswrz rswrz added the enhancement New feature or request label Dec 12, 2024
@rswrz
Copy link
Member

rswrz commented Dec 12, 2024

Thanks @nitrocode for opening this issue and suggesting this enhancement. We will discuss this in our next weekly meeting.

@rswrz
Copy link
Member

rswrz commented Dec 17, 2024

Meeting notes

Case 1: default/empty

      - name: Get Terraform version
        id: terraform_version
        uses: cloudeteer/actions/get-terraform-version@main

First found:

  • required_version from *.tf file (already implemented) (version constraint)
  • File: .terraform-version
  • tenv?
  • tfenv?
  • tofuenv?
  • asdf config?
  • more?

Case 2: specific file

      - name: Get Terraform version
        id: terraform_version
        uses: cloudeteer/actions/get-terraform-version@main
        file: file.txt

Search for Terraform version only in file.txt.

Case 3: custom file with custom pattern

      - name: Get Terraform version
        id: terraform_version
        uses: cloudeteer/actions/get-terraform-version@main
        file: custom_file.txt
        pattern: ^version: (.*)$

Tasks

  1. Implement .terraform-version
  2. Implement custom pattern
  3. Implement built-in pattern for tenv, tfenv, tofuenv, asdf configuration files

@lixhunter lixhunter linked a pull request Jan 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants