Documentation ¶
Overview ¶
Package variables provides functions and types for working with Terraform variables provided as input.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Merge ¶
Merge merges raw variable values b into a.
The parameters given here should be the full map of set variables, such as those created by Flag and FlagFile.
The merge behavior is to override the top-level key except for map types. Map types are merged together by key. Any other types are overwritten: primitives and lists.
This returns the resulting map. This merges into a but if a is nil a new map will be allocated. A non-nil "a" value is returned regardless.
func ParseInput ¶
ParseInput parses a manually inputed variable to a richer value.
This will turn raw input into rich types such as `[]` to a real list or `{}` to a real map. This function should be used to parse any manual untyped input for variables in order to provide a consistent experience.
Types ¶
type Flag ¶
type Flag map[string]interface{}
Flag a flag.Value implementation for parsing user variables from the command-line in the format of '-var key=value', where value is a type intended for use as a Terraform variable.