by zenlikethat · 9y ago · 0 comments
I wasn't ever really a huge YAML fan. It's way too ambiguous and sensitive to whitespace. One erroneous space is way more likely to mess up your YAML file than your HCL file.
It's not perfect, but I actually would like to see MORE systems using HCL, not fewer.
In TOML you can indent but it's not required:
[[fruit]]
name = "apple"
[[fruit.physical]]
color = "red"
shape = "round"
In HCL it's all just one (properly nested) object and you can `fmt` it: fruit {
name = "apple"
physical {
color = "red"
shape = "round"
}
}
It seems arbitrary but really matters once you're nesting a few levels deep, which tends to happen in anything complex such as an orchestration system.