Open caruccio opened 2 years ago
Thanks for the well-written issue. The block_map
spec type is not going to work, for the reason given in the error message: including dynamic (any
) types inside a map type definition will lead to inconsistent map element types when the map is fully evaluated.
I think the right type for representing this structure may be hcldec.BlockObjectSpec
, which is not currently available in cmd/hcldec
. I'm not familiar enough with these packages to say that this will work for sure.
I'd like to validate
variable
blocks in order to require all variables to have adescription
field. I'is part of the validation stage for my CI pipeline.This is the input I'm going to receive from my user:
And this is the spec I've got so far.
However
type=any
inside ablock_map
is not allowed, which produces the error below:Any tips?
PS:
Changing variables to use the now deprecated quoted type constraints (
type = "string"
andtype = "number"
) does works as expected, but since this syntax is deprecated we are not allowed to use it anymore.