terraform/lang
Martin Atkins ae3c0c6a4a lang/funcs: Remove the deprecated "list" and "map" functions
Prior to Terraform 0.12 these two functions were the only way to construct
literal lists and maps (respectively) in HIL expressions. Terraform 0.12,
by switching to HCL 2, introduced first-class syntax for constructing
tuple and object values, which can then be converted into list and map
values using the tolist and tomap type conversion functions.

We marked both of these functions as deprecated in the Terraform v0.12
release and have since then mentioned in the docs that they will be
removed in a future Terraform version. The "terraform 0.12upgrade" tool
from Terraform v0.12 also included a rule to automatically rewrite uses
of these functions into equivalent new syntax.

The main motivation for removing these now is just to get this change made
prior to Terraform 1.0. as we'll be doing with various other deprecations.
However, a specific reason for these two functions in particular is that
their existence is what caused us to invent the idea of a "type expression"
as a distinct kind of expression in Terraform v0.12, and so removing them
now would allow potentially  unifying type expressions with value
expressions in a future release.

We do not have any current specific plans to make that change, but one
potential motivation for doing so would be to take another attempt at a
generalized "convert" function which takes a type as one of its arguments.
Our previous attempt to implement such a function was foiled by the fact
that Terraform's expression validator doesn't have any way to know to
treat one argument of a particular function as special, and so it was
generating incorrect error messages. We won't necessarily do that, but
having these "list" and "map" functions out of the way leaves the option
open.
2020-11-04 17:05:59 -08:00
..
blocktoattr add benchmark used for DecoderSpec 2020-10-14 09:19:26 -04:00
funcs lang/funcs: Remove the deprecated "list" and "map" functions 2020-11-04 17:05:59 -08:00
testdata/functions-test lang/funcs: Update fileset() function to include path as separate first argument, automatically trim the path argument from results, and ensure results are always canonical with forward slash path separators 2019-08-30 20:19:44 -04:00
data.go remove GetModuleInstanceOutput 2020-04-14 14:49:10 -04:00
data_test.go eval Data needs to operate on whole modules 2020-04-12 10:50:31 -04:00
doc.go lang: new package for the runtime parts of the config language 2018-10-16 18:44:26 -07:00
eval.go allow path and terraform in self-block eval 2020-11-02 14:00:58 -05:00
eval_test.go allow path and terraform in self-block eval 2020-11-02 14:00:58 -05:00
functions.go lang/funcs: "anytrue" function 2020-10-23 13:52:48 -07:00
functions_test.go lang/funcs: Remove the deprecated "list" and "map" functions 2020-11-04 17:05:59 -08:00
references.go vendor: switch to HCL 2.0 in the HCL repository 2019-10-02 15:10:21 -07:00
scope.go terraform: ugly huge change to weave in new HCL2-oriented types 2018-10-16 18:46:46 -07:00