Internal variables #549
Replies: 2 comments 7 replies
-
|
maybe internal vars dont have to be access the same way as existings vars maybe |
Beta Was this translation helpful? Give feedback.
-
|
One benefit of making it more env-var like is that you still get Making it something else entirely could be useful but you lose out on all that good stuff... this is making me think more about just letting you mark things as internal somehow and/or using a naming convention (something like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes it is helpful to have intermediate storage of some data while you are transforming it. Putting that into a normal environment variable works, but it feels a little weird because we don't actually need to make it available outside the scope of the resolution.
In general we should probably add more functionality to have more control over which vars are available in different contexts - for example don't inject my secret zero (e.g.
OP_SERVICE_ACCOUNT_TOKEN) that was used to fetch other secrets into my application code.But there is a distinct case where a var is never used outside of varlock, and the idea here is to introduce a new concept of a "variable" to handle this. Defining it is probably a root decorator
These vars would be able to be used like env var refs within functions, so we probably need a way to distinguish between the two, probably a prefix/symbol of some kind. Given that regular env vars are usually referenced via the shorthand
$ENV_VAR_NAME, these vars could be something like$$VARNAMEor*VARNAME.To define the var it could be a root decorator call
@var(VARNAME, value)Alternatively it could be defined more like a regular env var
*VARNAME=foo, or maybe this whole concept is just a decorator@internalVaron existing items that says to never expose it outside of the varlock resolution process.Beta Was this translation helpful? Give feedback.
All reactions