But this is true regardless if you do it declaratively (via yaml) or imperatively (via programming).
In general, conditionals always exist, they just hidden in case of a yaml, or exposed in case of programming.
I think that declarative way is better as it raises the level of abstraction (not unlike SQL).
- Be able to Handle the conditional logic - Support the runtime to setup environment values. - Support runtime of any cloud service config in any cloud. - Interface for the Observability stack in the same runtime. - Rollback support for service and config.
The benefit of all that would be to be able to Unit, Integration test of the code , Static Analysis , Security scan , Vulnerability scan etc , that way we have a "real" prarallel and dynamic turing complete code for infrastructure.
Something around that experience is needed if we can get the community to support tooling around.
Its like a SQL join- I can declare a SQL join in SQL and let the RDBMS figure out the code(in which case I would need to verify the impl only once as part of the DBMS). Or I can offer NoSQL, and do a join in code by each user. I prefer to former.
When you want everything as code, you basically LOWER the level of abstraction.
All the tools that you mentioned, can also be run in a declarative system, but they need to run only once (by the framework/RDBMS) , instead of by users.