Replies: 2 comments 1 reply
|
I hacked together a thing this afternoon and it's soo nice. Only thing is that it loses the location of definition. https://github.com/lucasew/CONTRIB-opentofu/tree/exp/cue-config-frontend |
0 replies
|
I am not actively working on this, but I previously did some research/prototyping that I documented in CUE as a new language for OpenTofu, in case that's useful. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
CUE is a pretty nice language that works like a JSON with types that converges to the narrower path. It's often used as a "take a bunch of definitions maintained parallelly and generate the final artifact" which, in my experience, is kind of a lame approach. Ideally, the programs could support CUE and then the way of combining modules and stuff become much more natural.
I want to play with this possibility, essentially, apart from loading HCL from .terraform files, I want to set up a way for it to combine with CUE. The terraform model becomes CUE IR, it's combined in CUE's rules and then it expands to the JSON that it's meant to be.
Main issue I have today is defining a list/map by parts, like having to define all Nomad volumes in one single file and then define the actual service things in their own files. It's very error prone, I want a way to define everything about a specific service into a specific file, being by consequence able to do abstraction tricks that you will only see in NixOS modules, but tidier, and simpler, without fighting the limitations of the language.
All reactions