terraform/lang/funcs
Martin Atkins ecc42b838c lang/funcs: Fix crash and improve precision of keys/values functions
The "values" function wasn't producing consistently-ordered keys in its
result, leading to crashes. This fixes #19204.

While working on these functions anyway, this also improves slightly their
precision when working with object types, where we can produce a more
complete result for unknown values because the attribute names are part
of the type. We can also produce results for known maps that have unknown
elements; these unknowns will also appear in the values(...) result,
allowing them to propagate through expressions.

Finally, this adds a few more test cases to try different permutations
of empty and unknown values.
2018-11-06 08:33:49 -08:00
..
testdata lang/funcs: port some of Terraform's built-in functions 2018-10-16 18:48:28 -07:00
cidr.go port compact function 2018-10-16 18:49:20 -07:00
cidr_test.go port cidr functions 2018-10-16 18:49:20 -07:00
collection.go lang/funcs: Fix crash and improve precision of keys/values functions 2018-11-06 08:33:49 -08:00
collection_test.go lang/funcs: Fix crash and improve precision of keys/values functions 2018-11-06 08:33:49 -08:00
crypto.go lang/funcs: never include the private key in error output 2018-10-16 18:50:29 -07:00
crypto_test.go porting crypto functions 2018-10-16 18:49:20 -07:00
datetime.go cleanup comments for nicer godocs 2018-10-16 18:49:20 -07:00
datetime_test.go cleanup comments for nicer godocs 2018-10-16 18:49:20 -07:00
encoding.go base64decode: check that the decoded (not encoded) string is valid UTF-8 2018-10-16 18:49:20 -07:00
encoding_test.go base64decodeFunc now checks for valid UTF-8 2018-10-16 18:49:20 -07:00
filesystem.go lang: Add fileexists function 2018-10-17 10:18:07 +01:00
filesystem_test.go lang: Add fileexists function 2018-10-17 10:18:07 +01:00
number.go porting functions 2018-10-16 18:49:20 -07:00
number_test.go porting functions 2018-10-16 18:49:20 -07:00
string.go lang/funcs: in "sort", don't panic if given a null string 2018-10-16 19:14:11 -07:00
string_test.go porting many functions 2018-10-16 18:49:20 -07:00