3 ms·
The arguments around the language and syntax inconsistencies here really echo my experience. I can't help but think it just wasn't designed, but patched togeth
by danpalmer 6y ago
The arguments around the language and syntax inconsistencies here really echo my experience.
I can't help but think it just wasn't designed, but patched together by different people over time, with no over-arching vision. There's nothing in Terraform that couldn't just be YAML with some semantics (like Ansible which I find much more approachable), and while a custom language can absolutely do better than that, it really needs to justify itself, and I'm not sure Terraform does yet.
There's some hints of why it should be a custom language, but I honestly think it needs an overhaul focusing on consistency and clarity. These things really make a difference, I'd say it's one of the main reasons Go took off in such a big way for example.
- thraxil 6y ago> There's nothing in Terraform that couldn't just be YAML with some semantics (like Ansible which I find much more approachable) One secret of Terraform is that you can define resources with JSON instead of HCL (https://www.terraform.io/docs/configuration/syntax-json.html https://www.terraform.io/docs/configuration/syntax-json.html). The catch is that all the interpolation and iteration stuff is implemented in HCL, so if you use JSON, you probably want something else to do that. But, eg, Jsonnet works beautifully for that kind of thing: https://github.com/google/jsonnet/blob/master/examples/terraform/aws-two-tier.jsonnet https://github.com/google/jsonnet/blob/master/examples/terra...