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

> Hard disagree with replacing yaml with HCL.

I see some value instead. Lately I've been working on Terraform code to bring up a whole platform in half a day (aws sub-account, eks cluster, a managed nodegroup for karpenter, karpenter deployment, ingress controllers, LGTM stack, public/private dns zones, cert-manager and a lot more) and I did everything in Terraform, including Kubernetes resources.

What I appreciated about creating Kubernetes resources (and helm deployments) in HCL is that it's typed and has a schema, so any ide capable of talking to an LSP (language server protocol - I'm using GNU Emacs with terraform-ls) can provide meaningful auto-completion as well proper syntax checking (I don't need to apply something to see it fail, emacs (via the language server) can already tell me what I'm writing is wrong).

I really don't miss having to switch between my ide and the Kubernetes API reference to make sure I'm filling each field correctly.



I do something similar except with pulumi, and as a result I don't need to learn HCL, and I can rely on the excellent language servers for e.g. Typescript or python.


It's disappointing that your terraform experience with Typescript or python is better than your experience with HCL. HCL should really be better than it is.


But... so do yaml and json documents?


> so do yaml and json documents?

Not really. There are optional ways to add schema but nothing that's established enough to rely on.


I mean, I don't want to get into a debate about semantics, but when I open config.json files or kubernetes.yaml files in neovim, i get tab completed fields and values as well as inline errors about unsupported entries. That seems to qualify in my book.


Interesting - but is that because neovim has specifically added support for those formats (i.e. you've got some kind of Kubernetes-specific highlighting, not just generic yaml highlighting code?)


In this case it comes in via the coc plugin, which in turn has a plugin named coc-json, which, among other things, tries to download "well known" json schemas although now that I think about I'm not sure where those live.

Edit: apparently it just has popular ones built in: https://raw.githubusercontent.com/SchemaStore/schemastore/ma...




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

Search: