Files
Adrien DelormeandWilken Rivera e03ad29ca0 Sanitize var code (#11566)
* evaluateLocalVariables: modify code for readability and some (not benchmarked) perfs

* Make default input variable type the DynamicPseudoType

This should be the default, and avoids a panic. This type can represent situations where a type is not yet known. Its meaning is undefined in cty.

* do not take Empty types from default value

* Update types.variables.go

Co-authored-by: Wilken Rivera <[email protected]>
2022-02-14 11:00:41 -05:00

19 lines
205 B
HCL

variable "foo" {
default = []
}
variable "bar" {
default = {}
}
source "file" "base" {
}
build {
source "sources.file.base" {
target = "${var.bar.baz}.txt"
content = var.foo[0]
}
}