Repository navigation
Make Terragrunt plan with the same binary TerraVision reads with - #297
Closed
patrickchugh wants to merge 1 commit into
Closed
patrickchugh wants to merge 1 commit into
patrickchugh wants to merge 1 commit into
Conversation
Terragrunt defaults to OpenTofu when tofu is on PATH, while TerraVision's --engine auto prefers terraform. With both installed, Terragrunt wrote the plan with OpenTofu and TerraVision's terraform show failed: "plan files cannot be transferred between different Terraform versions". _tg_env now sets TG_TF_PATH (and TERRAGRUNT_TFPATH for Terragrunt before 0.73) to TerraVision's engine binary, unless the user already set one.
Owner
Author
|
Folded into #296 so the release goes through one CI run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Terragrunt uses OpenTofu by default when
tofuis on PATH, while TerraVision's--engine autoprefersterraform. With both installed, Terragrunt wrote the plan with OpenTofu and TerraVision'sterraform showfailed:This made
tests/test_tgwrapper.py::TestTgIntegration::test_terragrunt_full_pipelinefail locally onmain(OpenTofu 1.13.2 + Terraform 1.15.1 installed).Fix
_tg_env()(modules/tgwrapper.py) setsTG_TF_PATH(Terragrunt 0.73+) andTERRAGRUNT_TFPATH(0.50 to 0.72) to TerraVision's engine binary, so--enginenow covers Terragrunt too. A binary the user already set in either variable is left alone.The Terragrunt note in
docs/usage-guide.mdis updated: users no longer need to setTG_TF_PATHthemselves.Tests
TestTgEnv.test_terragrunt_full_pipelinepasses with both binaries installed.