-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support unknown variable evaluation #413
base: main
Are you sure you want to change the base?
Conversation
Expose a callback to handle unknown variables found in hcl syntax. This is useful in situations where the variables aren't known statically upfront.
Hi @notnoop! This seems reasonable to me in principle. I'd like to suggest a couple small tweaks to it in the hope of making it fit better with the existing features of this module:
|
Use UndefinedVariable to avoid the overloading usage of Unknown in the library.
Thanks @apparentlymart for the feedback and sorry for taking long to get back. I have updated the PR to use I have opted not go through the diags accumulation approach. The function |
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Mahmood Ali seems not to be a GitHub user. Have you signed the CLA already but the status is still pending? Recheck it. |
Expose a callback to handle unknown variables found in hcl syntax. This is useful in situations where the variables aren't known statically upfront.
When a chain of EvalContexts is used, the deepest child context with set UnknownVariable is used.