terraform/lang
Martin Atkins 382e1ca821 lang: yamldecode and yamlencode functions
These follow the same principle as jsondecode and jsonencode, but use
YAML instead of JSON.

YAML has a much more complex information model than JSON, so we can only
support a subset of it during decoding, but hopefully the subset supported
here is a useful one.

Because there are many different ways to _generate_ YAML, the yamlencode
function is forced to make some decisions, and those decisions are likely
to affect compatibility with other real-world YAML parsers. Although the
format here is intended to be generic and compatible, we may find that
there are problems with it that'll we'll want to adjust for in a future
release, so yamlencode is therefore marked as experimental for now until
the underlying library is ready to commit to ongoing byte-for-byte
compatibility in serialization.

The main use-case here is met by yamldecode, which will allow reading in
files written in YAML format by humans for use in Terraform modules, in
situations where a higher-level input format than direct Terraform
language declarations is helpful.
2019-06-04 16:24:09 -07:00
..
blocktoattr allow empty dynamic blocks with ConfigModeAttr 2019-05-31 16:31:24 -05:00
funcs simplify 2019-06-04 11:54:26 -04:00
testdata/functions-test lang/funcs: add acc tests for functions (#21112) 2019-04-29 13:11:28 -04:00
data.go core: Static-validate resource references against schemas 2018-11-26 08:25:03 -08:00
data_test.go core: Static-validate resource references against schemas 2018-11-26 08:25:03 -08:00
doc.go lang: new package for the runtime parts of the config language 2018-10-16 18:44:26 -07:00
eval.go lang: EvalBlock should use ReferencesInBlock 2019-04-03 15:57:17 -07:00
eval_test.go lang: EvalBlock should use ReferencesInBlock 2019-04-03 15:57:17 -07:00
functions.go lang: yamldecode and yamlencode functions 2019-06-04 16:24:09 -07:00
functions_test.go lang: yamldecode and yamlencode functions 2019-06-04 16:24:09 -07:00
references.go lang: Detect references when a list/set attr is defined using blocks 2019-03-28 10:41:01 -07:00
scope.go terraform: ugly huge change to weave in new HCL2-oriented types 2018-10-16 18:46:46 -07:00