Terragrunt This Week: Azure OIDC Token Fix, values Block and the path-variable Experiment
I looked at the last week of commits in terragrunt, the wrapper that runs OpenTofu and Terraform over many modules. Twenty commits landed in seven days, and two of them matter if you authenticate on Azure or share data between units.
Azure OIDC token sources now match OpenTofu
The headline change is the Azure OIDC token fix (#7446). Before it, bootstrapping an azurerm backend with ARM_USE_OIDC=true and the token in ARM_OIDC_TOKEN failed with a confusing error about a missing token file. The commit behind it teaches internal/azurehelper to read oidc_token and ARM_OIDC_TOKEN directly.
The fix also aligns the token source priority with OpenTofu:
- Azure DevOps service connection (
ado_service_connection_idplus a request token) - Direct token (
oidc_tokenorARM_OIDC_TOKEN) - Token file (
oidc_token_file_pathorAZURE_FEDERATED_TOKEN_FILE) - Token request URL, the source GitHub Actions sets
So if you run on AKS with a federated token file and a request URL both set, Terragrunt now uses the file. In Azure DevOps, set ARM_ADO_PIPELINE_SERVICE_CONNECTION_ID and ARM_OIDC_REQUEST_TOKEN to $(System.AccessToken). As a bonus, that service connection path reads dependency outputs straight from state instead of running init and output for every dependency.
The values block lands
The values block (#7405) adds a way to express shared values in one place and consume them across units, similar to what the empty dependency outputs experiment was trying to solve. The bulk of the work touched pkg/config/config.go and pkg/config/config_helpers.go.
It is experimental. The maintainers linked a feedback discussion for it, so if you have opinions on the surface, now is a good time to shape it before it stabilizes.
The path-variable experiment
Another experiment arrived: the path variable behind path-variable (#7397). It exposes the config path of the unit being processed as a variable, which is handy in generated configs and stack files where you need a stable, filesystem based identifier. The diff also added a changelog entry and docs pages under docs/src/data/changelog/v1.3.0.
Parser and CLI fixes worth knowing
Several small but user visible fixes:
- Read
terragrunt.hclbeforeterragrunt.hcl.json(#7404), so the plain HCL file wins when both exist in the same directory. - The
--destroy-dependencies-checkpanic (#7417), which crashed destroys that check dependent units. - The
dag graphexpression hang (#7400), where certain expressions kept the graph command spinning. - CAS
ls-remoterun outside the working directory (#7420), useful when the content addressed cache lives in another checkout.
On the performance side, the hardlink match fast path checks inodes before metadata, which makes file walking cheaper on large module trees. The rest of the diff volume is tests and docs: the config parsing work added parity tests in pkg/config/stack_parser_parity_test.go and internal/discovery, plus a Terraform bump to v1.17.2 in this commit.
How to prepare
- If you use OIDC with the
azurermstate backend on Azure, move to the build after #7446 and drop the token file workaround. - Try the
valuesblock and thepathvariable in a scratch stack. Both are behind experiments, so opt in explicitly and keep feedback coming. - Expect
v1.3.0changelog entries to keep landing ahead of the release. Several commits in this window were already documenting that version.