opentofu/lang/funcs
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
..
testdata lang/funcs: templatefile function 2018-12-21 08:06:14 -08:00
cidr_test.go add test cases and remove no-longer-needed validation 2020-07-08 13:53:54 -04:00
cidr.go add test cases and remove no-longer-needed validation 2020-07-08 13:53:54 -04:00
collection_test.go lang/funcs: Remove the deprecated "list" and "map" functions 2020-11-04 17:05:59 -08:00
collection.go lang/funcs: Remove the deprecated "list" and "map" functions 2020-11-04 17:05:59 -08:00
conversion_test.go lang/funcs: Type conversion functions 2019-01-17 10:01:47 -08:00
conversion.go lang/funcs: Type conversion functions 2019-01-17 10:01:47 -08:00
crypto_test.go lang/funcs: Add support for OpenSSH RSA key format 2020-06-03 10:50:38 -04:00
crypto.go lang/funcs: Add support for OpenSSH RSA key format 2020-06-03 10:50:38 -04:00
datetime_test.go cleanup comments for nicer godocs 2018-10-16 18:49:20 -07:00
datetime.go cleanup comments for nicer godocs 2018-10-16 18:49:20 -07:00
encoding_test.go lang/funcs: Rename the base64 character encoding functions 2020-10-21 10:56:56 -07:00
encoding.go lang/funcs: Rename the base64 character encoding functions 2020-10-21 10:56:56 -07:00
filesystem_test.go lang/funcs: Filesystem functions hint about dynamically-generated files 2020-06-24 09:02:38 -07:00
filesystem.go lang/funcs: Filesystem functions hint about dynamically-generated files 2020-06-24 09:02:38 -07:00
number_test.go remove old funcs code 2020-03-03 15:23:58 -05:00
number.go remove old funcs code 2020-03-03 15:23:58 -05:00
string_test.go remove old funcs code 2020-03-03 15:23:58 -05:00
string.go remove old funcs code 2020-03-03 15:23:58 -05:00