mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-30 10:47:14 -06:00
76dca009e0
The variable validator assumes that any AST node it gets from an
interpolation walk is an indicator of an interpolation. Unfortunately,
back in f223be15
we changed the interpolation walker to emit a LiteralNode
as a way to signal that the result is a literal but not identical to the
input due to escapes.
The existence of this issue suggests a bit of a design smell in that the
interpolation walker interface at first glance appears to skip over all
literals, but it actually emits them in this one situation. In the long
run we should perhaps think about whether the abstraction is right here,
but this is a shallow, tactical change that fixes #13001.
6 lines
179 B
HCL
6 lines
179 B
HCL
variable "foo" {
|
|
# This should be considered valid since the sequence is escaped and is
|
|
# thus not actually an interpolation.
|
|
default = "foo bar $${aws_instance.foo.bar}"
|
|
}
|