mirror of https://github.com/hashicorp/terraform
In the old world, lists and maps could be created either using functions in HIL or list/object constructs in HCL. Here we ensure that in the HCL case we'll apply any required expression transformations to the individual items within HCL's compound constructs.pull/19548/head
parent
e49d993d89
commit
8cf024d45a
@ -0,0 +1,18 @@
|
||||
locals {
|
||||
in_map = {
|
||||
foo = "${var.baz}"
|
||||
}
|
||||
in_list = [
|
||||
"${var.baz}",
|
||||
"${var.bar}",
|
||||
]
|
||||
in_list_oneline = ["${var.baz}", "${var.bar}"]
|
||||
in_map_of_list = {
|
||||
foo = ["${var.baz}"]
|
||||
}
|
||||
in_list_of_map = [
|
||||
{
|
||||
foo = "${var.baz}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
locals {
|
||||
in_map = {
|
||||
foo = var.baz
|
||||
}
|
||||
in_list = [
|
||||
var.baz,
|
||||
var.bar,
|
||||
]
|
||||
in_list_oneline = [var.baz, var.bar]
|
||||
in_map_of_list = {
|
||||
foo = [var.baz]
|
||||
}
|
||||
in_list_of_map = [
|
||||
{
|
||||
foo = var.baz
|
||||
},
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
terraform {
|
||||
required_version = ">= 0.12"
|
||||
}
|
||||
Loading…
Reference in new issue