Skip to content

fix: generate local mise.toml config when tf/tofu_version inputs are set#119

Open
Tensho wants to merge 3 commits intogruntwork-io:mainfrom
Tensho:mise-hjierarchical-lookup
Open

fix: generate local mise.toml config when tf/tofu_version inputs are set#119
Tensho wants to merge 3 commits intogruntwork-io:mainfrom
Tensho:mise-hjierarchical-lookup

Conversation

@Tensho
Copy link

@Tensho Tensho commented Oct 16, 2025

Description

The current mise.toml config file presence check doesn't look up to the repository root:

# infrastructure estate repo
path
└─to
  └─unit               <=== when working directory is set here
    └─ terragrunt.hcl
mise.toml              <=== shell check can't find it within the scope of the unit directory

Hence, error like this come up:

image

I guess there was an assumption that action should always target repo root, not a unit folder. In contrast, mise looks up config file hierarchically, which is expected behaviour for those who rely on this dev tool. This PR preserves tf_version/tofu_version action inputs precedence over mise.toml, but with mise-native approach:

  1. If tf_version/tofu_version input variable is set, no matter of mise.toml config file presence (at any level) – generate local mise.toml config file and let mise look it up and use.
  2. If tf_version/tofu_version input variable is not set, but mise.toml config files is present (not necessary at the root, anywhere upwards the current working directory) – let mise look it up and use.
  3. If tf_version/tofu_version input variable is not set and mise.toml config files is present – let mise install the latest version.

This behaviour is intuitive in terms of tool versions resolution.

Release Notes (draft)

Added

`tf_version` action input to specify Terraform version

Updated

Handle `mise.toml` config file at any level (not only at root) with mise native hierarchical lookup

Migration Guide

N/A

Notes

  • Added tf_version action input to specify desired Terraform version. I don't know why it has been removed in v3, TBH. Happy to yank it if you want to preserve tofu_version + tf_path interface exclusively.
  • Updates jdx/mise-action from v2 to v3. There are no breaking changes.
  • Replaced MISE_GITHUB_TOKEN environment variable with github_token action input as the former one is not supported (code search)

P.S. I like the tools versioning shift towards mise and I appreciate there is an option for it 👍

@Tensho Tensho force-pushed the mise-hjierarchical-lookup branch from f354e0a to 6a481ee Compare October 16, 2025 12:26
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

Successfully merging this pull request may close these issues.

1 participant