Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh god. hcl is one of the worst parts of terraform. I really wonder what other declarative languages were considered for this because it feels like a very weird base to start with :/


Is it possible some of your perception is shaped by Terraform’s implementation? I’m not a huge fan of json/yaml/etc as a DSL but Terraform makes/made some choices that leave me empty inside. But only after I read the original issue with hundreds of comments that was then migrated by a bot to a new repo issue which is then closed after hundreds more comments because a more recent issue that’s more specific is now around and then that one is closed after dozens of comments because there’s a roll up issue.


Maybe. On the other hand a lot of terraform's implementation has been shaped by how they themselves designed hcl, right? Things like multi-nesting function calls inside quotes and what not. All the dollar signs. I can't even tell if that's terraform or HCL, to be honest.


Based on the README, hcl looks like a small and fairly sane extension to JSON. What do you dislike about it?


Here's an example of a nested function call from one of my infrastructure files:

    public_key = "${file("${path.root}/../ssh/id_rsa.pub")}"
 
Is this terraform's implementation, or hcl's? HCL has to implement that syntax somehow, right?


It looks like they have an "interpolation syntax" that works with either JSON or hcl. I guess that's a separate but related mini-language?

https://www.terraform.io/docs/configuration/interpolation.ht...


Hmmmm, does that make it pre-processing on hcl? If so I guess that makes a little more sense.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: