Hacker News new | ask | show | jobs
by Doji 1924 days ago
This comment requires explanation.
1 comments

I had to use Terraform at work to configure some SDN controllers . I never felt the need for an external language.

You can list a directory, read all the json that dir (in a single list/map comprehension/building expression) and use that to feed your modules that manage the actual terraform resources.

When you realize that terraform modules are functions, terraform become a usable functional language.

Why would I want to generate some terraform when I can simply use it to generate the desired state using my higher level data ?

Edit: Please disregard, wrong person

> terraform modules are functions

You seem to have found this feature useful. Doesn't that answer your question about why you would want a configuration language to have functions?

I just gave a counterexample to that part of the link you posted:

  ... all requiring potentially complex generation of configuration.
I am just skeptical that past some level of complexity, terraform requires a generator.
Nickel does not generate Terraform. It is simply a language. The idea is that projects like Terraform could use it rather than create their own language out of a mess of JSON files.

In that sentence, I believe their meaning is that Terraform's language is already capable of generating configuration, and in fact this is a feature which is quite essential to Terraform's use. They acknowledge that all these projects (Nix, Terraform, Bazel, etc) already utilize relatively sophisticated programming languages for configuration. Nickel merely aims to be a better designed language for the purpose.

They’re not the one who asked the question…
Thanks, my mistake