You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently came accross an old script stored in a repo whose responsibility I took over which was meant to be used for improve the repo's overall documentation automatically. This script was executing the command
terragrunt graph -draw-cycles "${INPUT_DIR}" | dot ... #Convert output to GraphViz and write to SVG file
It took me a while to understand, that this command was failing with error "-draw-cycles is not a valid option" because that after I upgraded to a newer Terragrunt version (v0.72.2) a few weeks ago, the command was not forwarded to Terraform anymore but instead was resolved by Terragrunt as in a previous release the "graph" command was introduced as well (unfortunately with an entirely different functionality)
But I came accross the quite new and currently active "cli-redesign" experiment and thought "well, that might be exactly what I need to make the script work again as before", so I upgraded to (v0.73.15) and tried to execute the previous mentioned command as follows now:
Unfortunately no success, as now I am receiving the following Error Message:
ERROR Terraform has no command named "". To see all of Terraform's top-level commands, run: terraform -help
ERROR Unable to determine underlying exit code, so Terragrunt will exit with error code 1
When trying to use the new "run" command with e.g. "plan" everything works as expected, but looking at the error message I got the feeling, that for some reason Terragrunt seems to not forward the "graph" command to Terraform at all and just swallows it along the way, because in the error message it is looking like I did not provide a Terraform command at all. But when providing an actual invalid-command as a cross-check, that is showing up to be unknown in the error message (as expected):
terragrunt --experiment cli-redesign run -- invalid-command
Terraform has no command named "invalid-command". To see all of Terraform's top-level commands, run: terraform -help
Unable to determine underlying exit code, so Terragrunt will exit with error code 1
So there seems to be some special (miss)handling in the current experiment when passing either the graph command or maybe even when overall passing commands, which have an equal name in the Terragrunt CLI
Steps To Reproduce
Just run terragrunt --experiment cli-redesign run -- graph against an arbitrary terragrunt.hcl file
Expected behavior
No matter the command passed over to "run" (esspecially after already seperating it with -- from the terragrunt command flags), it should be forwarded to Terraform as documented
Versions
Terragrunt version: v0.73.15
OpenTofu/Terraform version: Terraform v1.5.7 on linux_amd64
Environment details (Ubuntu 20.04, Windows 10, etc.): Running in Docker container based on Ubuntu 20.04 image
The text was updated successfully, but these errors were encountered:
Describe the bug
I recently came accross an old script stored in a repo whose responsibility I took over which was meant to be used for improve the repo's overall documentation automatically. This script was executing the command
terragrunt graph -draw-cycles "${INPUT_DIR}" | dot ... #Convert output to GraphViz and write to SVG file
It took me a while to understand, that this command was failing with error "-draw-cycles is not a valid option" because that after I upgraded to a newer Terragrunt version (v0.72.2) a few weeks ago, the command was not forwarded to Terraform anymore but instead was resolved by Terragrunt as in a previous release the "graph" command was introduced as well (unfortunately with an entirely different functionality)
But I came accross the quite new and currently active "cli-redesign" experiment and thought "well, that might be exactly what I need to make the script work again as before", so I upgraded to (v0.73.15) and tried to execute the previous mentioned command as follows now:
terragrunt --experiment cli-redesign run -- graph -draw-cycles "${INPUT_DIR}" | dot ...
Unfortunately no success, as now I am receiving the following Error Message:
When trying to use the new "run" command with e.g. "plan" everything works as expected, but looking at the error message I got the feeling, that for some reason Terragrunt seems to not forward the "graph" command to Terraform at all and just swallows it along the way, because in the error message it is looking like I did not provide a Terraform command at all. But when providing an actual invalid-command as a cross-check, that is showing up to be unknown in the error message (as expected):
So there seems to be some special (miss)handling in the current experiment when passing either the graph command or maybe even when overall passing commands, which have an equal name in the Terragrunt CLI
Steps To Reproduce
Just run
terragrunt --experiment cli-redesign run -- graph
against an arbitrary terragrunt.hcl fileExpected behavior
No matter the command passed over to "run" (esspecially after already seperating it with -- from the terragrunt command flags), it should be forwarded to Terraform as documented
Versions
The text was updated successfully, but these errors were encountered: