The more I work with infrastructure as code the more I dislike it. I think that’s because fundamentally it’s the wrong metaphor. Code is terrible. Code is brittle and constantly breaking. Even with immutable infrastructure you still have pretty much the same problems. I’ve used almost every configuration management tool that is out there and found them lacking.
The proper metaphor is infrastructure as a streaming/reactive database. Rows are inserted and deleted and stream processors react to these events and do things accordingly. How many application servers do I have? Sounds like a select statement. Take a server out of a load balancer. Sounds like an update statement. Bring up another application server. Sounds like an insert statement. How many servers have high load? Sounds like another select statement. Add a user as an admin to these servers. Sounds like an insert or update statement.
So where is the infrastructure as a database movement?