Documentation
¶
Overview ¶
Package funcs defines extra HCL functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EnvFunc = function.New(&function.Spec{ Params: []function.Parameter{ { Name: "var_name", Type: cty.String, }, }, Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, _ cty.Type) (cty.Value, error) { ret := os.Getenv(args[0].AsString()) return cty.StringVal(ret), nil }, })
EnvFunc returns the value of an environment variable by name. If the environment variable doesn't exist, an empty string is returned.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.