Terraform stacks, accessing global variables in stack files #4886
Closed
manuelgarridopena-afk
started this conversation in
General
Replies: 2 comments 1 reply
-
You might be better using the discord help channel: |
Beta Was this translation helpful? Give feedback.
1 reply
-
thanks everyone, we discussed it in discord and @yhakbar has shared the summary in the thread, we can close the issue. |
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
Uh oh!
There was an error while loading. Please reload this page.
-
(Not sure if this is the right place to post this question, if not, feel free to close)
I am trying to follow the Terragrunt stack best practices for repository structure using terraform stacks. I am using the sample repository as a guideline.
I asked this question in the sample repository, but im not sure if the questions should be addressed here.
I am following the structure described in the repo (using stacks), and the root.hcl file states at the bottom: # Configure root level variables that all resources can inherit....
I have tried to define at the environment level a terragrunt.stack.hcl and reference variables defined in the root file, no matter how I try to import then, nothing works.
I have tried:
-referencing the full path ( so local.account_vars.locals.account_name in the example)
-reference them as magically injected locals (local.account_name in the example)
-maybe they are vars, since it says in the example 'configure root level variables' (vars.account_name)
So my question is, is it possible to we reference variables defined in the root.hcl (for example, this variable ) in stack files (for example, here ) ?
Beta Was this translation helpful? Give feedback.
All reactions