docs(vac): VaaC definition

This commit is contained in:
gwen 2026-06-05 14:55:05 +02:00
parent 7b58d9a774
commit 13738fd4bf

View file

@ -1,7 +1,45 @@
Variables as Code
==================
"Variables as Code" is the practice of managing configuration variables the same way you treat source code.
..
To do this, we need a typed variable definitions with defaults and validation.
Once defined, variables must be able to:
- provide useful information to the operator to make their choices
- load user values from differents sources
- validate the context
- display and archive the final values in a readable format
- allow other applications to use these variables
Definition
--------------
**Variables as Code** is the practice of managing configuration variables the same way you treat source code.
It is a concept that extends the Infrastructure as Code (IaC) philosophy to the management of configuration variables, secrets, and environment-specific settings.
More precisely, this extends Configuration as Code (CaC) principles.
The idea is to treat variables — not just infrastructure or configuration — as version-controlled, declarative, and automated code rather than manual, static, or hardcoded values.
With growing complexity of the infrastructure, it is difficult to manage all the variables.
Variables can be redundant and sometimes are defined on several places.
A typical example is the management of Ansible collections.
Currently, when you distribute an Ansible collection, you distribute the recipes that allow you to deploy a component, the default values for certain variables, and possibly variable validation.
However, you don't share the variable declarations. Therefore, each user would have to rewrite the user documentation, define the global context themselves, and so on. It is therefore the user's responsibility to maintain the consistency of the variables with these given problems.
And I'm not even talking about managing variables in a multi-project context.
It is often necessary to recreate the same variables with the same constraints over and over again between different projects.
For this, we thought of a solution and came up with a concept of managing all our variables as a code called VaC (Variables as Code).
Often when we talk about VaC (or CaC) we think of the different environments (Development, Staging, Production).
With Rougail, this question does not arise. Essentially, Rougail manages this with user data. Here I'm talking about sharing variables between projects.
To do this, we need a typed variable definitions with defaults and validation.