Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EnvFunc = function.New(&function.Spec{ Params: []function.Parameter{ { Name: "key", Type: cty.String, AllowNull: false, AllowUnknown: false, }, }, Type: function.StaticReturnType(cty.String), Impl: func(args []cty.Value, retType cty.Type) (cty.Value, error) { key := args[0].AsString() value := os.Getenv(key) return cty.StringVal(value), nil }, })
shamelessly ripped from Packer EnvFunc constructs a function that returns a string representation of the env var behind a value
Functions ¶
func FindConfigFile ¶
walks backwards depth n parent directories looking for filename
func ProcessConfig ¶
Types ¶
type Ad ¶
type Ad struct { Name string `hcl:",label"` Role string `hcl:"role"` Mount string `hcl:"mount,optional"` TargetProvider string `hcl:"target_provider"` UsernameEnvVar string `hcl:"username_env_var,optional"` PasswordEnvVar string `hcl:"password_env_var,optional"` ExtraEnvVars map[string]string `hcl:"extra_env_vars,optional"` ExpandEnv bool `hcl:"expand_env_vars,optional"` }
type Auth ¶
type Aws ¶
type Azure ¶ added in v0.3.0
type Config ¶
type Config struct { Auth []*Auth `hcl:"auth,block"` Ad []*Ad `hcl:"ad,block"` Aws *Aws `hcl:"aws,block"` Azure *Azure `hcl:"azure,block"` KvSecret []*KvSecret `hcl:"kv_secret,block"` }
func ParseConfig ¶
Parse will parse file content into valid config.
type KvSecret ¶
type KvSecret struct { Name string `hcl:",label"` Path string `hcl:"path"` Mount string `hcl:"mount,optional"` TargetProvider string `hcl:"target_provider"` AttributeMap map[string]string `hcl:"attribute_map,optional"` ExtraEnvVars map[string]string `hcl:"extra_env_vars,optional"` ExpandEnv bool `hcl:"expand_env_vars,optional"` }
Click to show internal directories.
Click to hide internal directories.