ah ok, i see. thanks for the project https://cbonte.github.io/haproxy-dconv/configuration-1.6.html#7.2 here is an example of an existing/mature configuration language, that does a similar task. not advocating it as better, but its a feature set available in a similar program that i use. haproxy now supports lua scripting, which i think is interesting, because its a scripting language on a reactive event loop (familure?)
mportant: : Currently, Vamp-router does NOT check validity of the HAproxy command, ACLs and configs submitted to it. Submitting a config where a frontend references a non-existing backend will be accepted by the REST api but crash HAproxy.
which is terriable
my version will make sure haproxy reloads cleanly, or roll it back