在 terraform 版本从 0.11 更新到 0.12.26 后,我看到地图内的查找和值列表出现错误。
variable "foo" {
type = map
}
foo = {
x.y = "bar"
}
我有一个映射“foo”作为变量类型(映射),然后我在映射中有 xy =“bar”的键值对。在查找中,我试图读取 xy 的值,
lookup(var.foo, x.y)
有了这个,我得到了错误,
Error: Ambiguous attribute key
on line 13:
13: x.y = "bar"
If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.
有人可以帮忙吗?