When a unit depends on outputs from another unit with no dependencies, it throws an error that looks like the following:
08:57:09.936 ERROR error occurred:
* ./foo/terragrunt.hcl is a dependency of ./bar/terragrunt.hcl but detected no outputs. Either the target module has not been applied yet, or the module has no outputs. If this is expected, set the skip_outputs flag to true on the dependency block.
08:57:09.936 ERROR Unable to determine underlying exit code, so Terragrunt will exit with error code 1
While the error does accurately describe the problem, it doesn't offer the best prescriptive guidance on how to fix the issue.
Then populate bar/terragrunt.hcl with the following:
dependency "foo" {
config_path = "../foo"
}
Expected behavior
The error that Terragrunt could not determine the underlying exit code should be removed, as it's clear what the underlying error is, and there should be a hint that a user could have used mocks to avoid the issue if they encountered the error during a plan of a dependency that wasn't applied yet.
Ideally, there should actually be an HCL sample emitted that a user could copy + paste to bypass the issue.
Nice to haves
[x] Terminal output
[ ] Screenshots
Versions
Terragrunt version: v0.68.13
OpenTofu version: v1.8.5
Environment details (Ubuntu 20.04, Windows 10, etc.): MacOS
Additional context
I encountered this as an expected error while writing up a guide for new users to adopt Terragrunt. These are the most important errors to get right, and they should be as good as possible.
Describe the bug
When a unit depends on outputs from another unit with no dependencies, it throws an error that looks like the following:
While the error does accurately describe the problem, it doesn't offer the best prescriptive guidance on how to fix the issue.
Steps To Reproduce
Create the following fixture:
Then populate
bar/terragrunt.hcl
with the following:Expected behavior
The error that Terragrunt could not determine the underlying exit code should be removed, as it's clear what the underlying error is, and there should be a hint that a user could have used mocks to avoid the issue if they encountered the error during a plan of a dependency that wasn't applied yet.
Ideally, there should actually be an HCL sample emitted that a user could copy + paste to bypass the issue.
Nice to haves
Versions
v0.68.13
v1.8.5
Additional context
I encountered this as an expected error while writing up a guide for new users to adopt Terragrunt. These are the most important errors to get right, and they should be as good as possible.