Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TimestampFunc = function.New(&function.Spec{ Params: []function.Parameter{}, Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { return cty.StringVal(time.Now().UTC().Format(time.RFC3339)), nil }, })
TimestampFunc constructs a function that returns a string representation of the current date and time.
View Source
var VaultFunc = function.New(&function.Spec{ Params: []function.Parameter{ { Name: "path", Type: cty.String, }, { Name: "key", Type: cty.String, }, }, Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { path := args[0].AsString() key := args[1].AsString() val, err := commontpl.Vault(path, key) return cty.StringVal(val), err }, })
VaultFunc constructs a function that retrieves KV secrets from HC vault
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.