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

Presence of .terraform-version makes terragrunt fail #66

Open
2 tasks
arengifo-lbx opened this issue May 4, 2024 · 0 comments
Open
2 tasks

Presence of .terraform-version makes terragrunt fail #66

arengifo-lbx opened this issue May 4, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@arengifo-lbx
Copy link

Describe the bug
When running the terragrunt action in a folder that contains a .terraform-version file, the action install the terraform version specified in the tf_version input rather than use the version specified in .terraform-version. Then, when terragrunt runs the action (i.e. "plan"), it fails because cannot find the terrafom binary version specified in .terraform-version

To Reproduce
Create a .terraform-version that specifies a version different than the defined in tf_version input

Expected behavior
Terragrunt action should first look for the presence of .terraform-version to decide which version to install. This code could make a difference:

  if [ -f .terraform-version ]; then
    tfversion=$(cat .terraform-version)
    log "Installing Terraform version ${tfversion}"
    mise install terraform
  fi
  log "Installing Terraform version ${version}"
  mise install terraform@"${version}"

Nice to have

  • Terminal output
  • Screenshots

Versions

  • Terragrunt Action version: v2.1.1
  • Environment details (Terragrunt version, Terraform version, etc.):

Additional context
N/A

@arengifo-lbx arengifo-lbx added the bug Something isn't working label May 4, 2024
@linear linear bot assigned denis256 Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants