Skip to content

terragrunt uses default terraform despite 'tenv tf use <version>' because TERRAGRUNT_TFPATH is not updated #522

@utkarsh079

Description

@utkarsh079

Describe the bug
When running tenv tf use <version> and then executing terragrunt, terragrunt still uses the default terraform binary instead of the version set by tenv, since the TERRAGRUNT_TFPATH is set to /usr/local/bin/terraform.

To Reproduce
Steps to reproduce the behavior:

  1. Use tenv tf use <version> to switch to a different terraform version.
  2. Run terragrunt.
  3. Observe that terragrunt continues to use /usr/lib/bin/terraform.

Expected behavior
Terragrunt should respect the version set by tenv tf use <version>, not the default system terraform.

Environment (please complete the following information):

  • OS: Almalinux 8

Additional context
The issue is caused because TERRAGRUNT_TFPATH is set to the system terraform binary. tenv should update this for the shell session or document how users can manually point terragrunt to the correct binary.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions