Infrastructure as Code Theory
Created on 2021-11-12T21:43:17-06:00
- Define your current world state as a tree. Usually this is cached from a previous run of a tool or through an import process.
- Define the desired world state as a tree.
- Run a tree differencing algorithm to create a change tape from current world state to desired world state.
- Convert the change tape to a set of runnable tasks.
Policy enforcement tools can verify the desired world state or the change tape (ex. Pulumi's "guard rails".)
Database schema migration tools can work similarly. Differencing two schemas and creating a tape to migrate data from one format to another.