How do I mock dependency outputs within hooks in my terragrunt.hcl configuration? #812
Unanswered
vishvikkrishnan
asked this question in
How do I
Replies: 1 comment
-
Hi,
https://terragrunt.gruntwork.io/docs/reference/config-blocks-and-attributes/#dependency Simplified example in: https://github.com/denis256/terragrunt-tests/tree/master/discussion-812 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use a
before_hook
which executes a command with a "dynamic" value in my terragrunt.hcl file. The block is able to read values from the locals block from the root configuration, however, it fails to resolve the dependency output. Here is the before_hook block:The above block executes just fine for operations like
terragrunt apply
andterragrunt destroy
because the outputs are already available in the state for terragrunt to fetch. However, other operations like init, validate, validate-inputs, and plan result in an error.I'd like to know how to "mock" such outputs that are computed from module dependencies inside the hooks so the other operations continue to work. Happy to open a bug/feature request if this is a valid use case.
Tracked in ticket #110850
Beta Was this translation helpful? Give feedback.
All reactions