I have some shared terraform modules that are currently used by a number of terraform 0.11 based projects. I want to gradually migrate the projects to 0.12 and try to retain the module's compatibility with both 0.11 and 0.12. I am having trouble with list attributes, which have changed from having a bracket syntax.
In terraform 0.11 brackets were required around a single expression in order to hint to the language interpreter that a list interpretation was desired:
# Example for older versions of Terraform; not valid for v0.12
example = ["${var.any_list}"]
In terraform 0.12 an expression like the above will now produce a list of lists and thus produce a type checking error for any argument that was expecting a list of some other type.
# Example for Terraform v0.12
example = var.any_list
Is it possible to set the list attribute in a way that is compatible with both 0.11 and 0.12?