mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
81b0c4b28d
We've been incorrectly validating (or not validating at all) the requirement that certain blocks be followed by a name string, to prohibit e.g. this: variable {} and: variable = "" Before this change we were catching this for most constructs only if there were no _valid_ blocks of the same name in the same file. For modules in particular, we were not catching this at all. Now we detect this for all kinds of block (resources had a pre-existing check, so aren't touched here) and produce a different error message depending on which of the above incorrect forms are used. This fixes #13575.
9 lines
99 B
HCL
9 lines
99 B
HCL
variable "okay" {
|
|
}
|
|
|
|
variable {
|
|
name = "test"
|
|
default = "test_value"
|
|
type = "string"
|
|
}
|