-
|
I want to generate a new file, then read it.
tg_render = run_cmd("tg-render.bash")
tg_config = jsondecode(file(local.tg_render_path)) # run_cmd("cat", "${local.tg_render_path}") is not work tooFail Pass So, are there any methods to arrange order of variables evaluation ? |
Beta Was this translation helpful? Give feedback.
Answered by
Arpo201
Jan 9, 2025
Replies: 1 comment 3 replies
-
|
Hey @Arpo201 , why are you trying to create the file then read it? You can simply return the JSON payload as stdout from HCL functions are evaluated concurrently in order to maximize performance, so unless there's a dependency between the locals, they'll be evaluated at the same time. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wow, that works!! Thank you.
For anyone, this is my solution (File descriptors):
Explanation:
0refers to standard input (stdin).1refers to standard output (stdout).2refers to standard error (stderr).