|
|
|
|
|
by latchkey
974 days ago
|
|
It is amazing to me that people call Java verbose when you have things like this to declare a simple variable: variable "service" {
type = string
description = "Name of the service"
}
HCL isn't a bonus, it is a hinderance. If you're going to build something like this, you might as well just use TypeScript or Python as your backend language.Beyond that, this just looks like yet another task executor... as you say, like make. At which point, you might as well just use a task executor. If make is not your liking, how about https://github.com/casey/just |
|
Other thing that is funny: no user-defined functions; being unable to use function calls in string interpolations, but allowing variables... so it is like saying: we have this parser and at some points it allows expressions, at some other point not. This seems wrong.
At the same time I agree with or at least understand original author's intent to squeeze HCL to maxinum. There is something appealing in HCL's visual form, at least when defining resources. Maybe it's just (almost) simplest form of defining such structures that can exists.
This is why I started to work on my own format for configuration, visually similar but with different model of computation.
Here is the first attempt: https://github.com/wkhere/bcl
Disclaimer: I named it BCL, 'B' stands for Basic, to somehow relate to HCL and make it easily pronounced. But later I discovered that another BCL is used as Google to configure the Borg platform and seems to be massively hated ;) So I look for a better name..
Project seems to be a bit stalled since few weeks, but that's illusory, as I have a rewrite with a non-yacc parser almost ready in the other branch. Then I will code parsing nested structures and at that point it will become really neat. Plus, an add of implementation in several other languages I usually code.
Please stay tuned if you like it.. or tell me what's wrong with it if you don't ;)