You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is already possible to use the values of environment variables through env var in HCL. This has a limited use, though, since env var values exist outside the evaluation context and can not be easily filtered/mutated.
Design
Env variables should be available in the evaluation context under .env root key.
To minimize the risk of exposing all environment variables to potentially malicious plugins, we introduce a global configuration argument expose_env_vars_with_prefix.
If expose_env_vars_with_prefix is set, only the env vars that have the prefix in their name are available in the context under .env key.
If expose_env_vars_with_prefix is null, use the default value.
If expose_env_vars_with_prefix is an empty string, all env variables are exposed in the context
Example:
fabric {
expose_env_vars_with_prefix="FABRIC_"# default value
}
document"test" {
contenttext {
value="All env vars in the context: {{ .env | toPrettyJson }}"
}
}
The text was updated successfully, but these errors were encountered:
Background
It is already possible to use the values of environment variables through
env
var in HCL. This has a limited use, though, since env var values exist outside the evaluation context and can not be easily filtered/mutated.Design
Env variables should be available in the evaluation context under
.env
root key.To minimize the risk of exposing all environment variables to potentially malicious plugins, we introduce a global configuration argument
expose_env_vars_with_prefix
.If
expose_env_vars_with_prefix
is set, only the env vars that have the prefix in their name are available in the context under.env
key.If
expose_env_vars_with_prefix
is null, use the default value.If
expose_env_vars_with_prefix
is an empty string, all env variables are exposed in the contextExample:
The text was updated successfully, but these errors were encountered: