Declarative languages can absolutely loop. Otherwise functional languages wouldn't be a thing.
HCL's looping and conditionals are a mess but they're wonderful in comparison to its facilities for defining and calling functions.
HCL's looping and conditionals are a mess but they're wonderful in comparison to its facilities for defining and calling functions.
Good functional languages like Clojure make something like this awkward and painful to do, because it doesn't really make sense in a functional context.