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

Action does not use terraform_version sometimes #130

Closed
russmac opened this issue Aug 24, 2021 · 3 comments
Closed

Action does not use terraform_version sometimes #130

russmac opened this issue Aug 24, 2021 · 3 comments

Comments

@russmac
Copy link

russmac commented Aug 24, 2021

I've noticed on several occasions now , the action will seemingly ignore some minor versions and simply use a newer version causing my version lock and assertion to fail. Switching to the newer forced version it is of course then used (for some time)

I have a version assertion in my code , which is only respected temporarily it appears new releases cause the issue, However I am not sure if this is intended behavior as it does not appear to be documented.

        - uses: hashicorp/setup-terraform@v1
          with:
            terraform_version: 1.0.3

How to reproduce:
runs-on: ubuntu-20.04
Set your terraform_version to 1.0.3 it will install newer version, no warning logs to indicate why.

@Tomasz-Kluczkowski
Copy link

I have now figured out my mistake since I had similar issue.

When using a globally set terraform version for all actions accessing it should be via env node.

So when doing this in the workflow setup:

env:
   TERRAFORM_VERSION: 1.3.2

And then reading it in setup-terraform we have to access this via ${{ env.TERRAFORM_VERSION }} not just $TERRAFORM_VERSION which was what I tried to do...

    - uses: hashicorp/setup-terraform@v2
      with:
        terraform_version: ${{ env.TERRAFORM_VERSION }}

Check if you have made same mistake and fix for the win.

@bflad
Copy link
Contributor

bflad commented Nov 29, 2023

Hi @russmac 👋 Thank you for reporting this awhile ago and sorry for the delayed response. I'm guessing this particular issue was fixed awhile ago but this issue was never closed. We have not heard similar bug reports recently. If you are still experiencing this issue using recent versions of this action, please open a fresh issue and we can take an updated look into the situation. Thanks.

@bflad bflad closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants