Our current Cloud landscape would not be feasible if it weren't for automation; infrastructure that scales automatically based on the resource requirements would be virtually impossible otherwise.
But not all automation is born equal; there are two antagonistic approaches to automation. One is Imperative Infrastructure Automation (simply Imperative Automation from now on), the kind of automation that writes scripts or recipes specifying every step of the process, one after the other, to achieve the desired state.
Whatever logic is needed to achieve that state must be incorporated in the automation (script) itself; in other words, the 'intelligence' of the process is in the script and not in the software that executes it.
The other approach is Declarative Infrastructure Automation (simply Declarative Automation from now on). Instead of scripting every step of the process to achieve the desired state, the desired state is declared in some specific language or form (most commonly yamls), and it is the job of software interpreting that declared state to reach it.
Every technology on every application has limitations; as much as we might like Declarative Automation, it is not a silver bullet, and it won't magically solve all your cloud infrastructure problems. In the following sections and blog article, we will discuss the use cases and some limitations of both technologies to give a better idea of when each automation approach might be advisable over the other.
Initially, we expected to cover this topic in only one article, but while writing, we noticed a lot more to say about this; therefore, we decided to split it into two separate pieces.
We will follow up this blog article with two more pieces exploring the use cases of both Imperative and Declarative automation in more depth, so keep an eye out for that.