Infrastructure as Code vs Infrastructure as Config
This article is part one of a multipart series exploring the idea of building a true Infrastructure as Code solution on the Amazon Web Services (AWS) platform.
What is Infrastructure as Code?
I’ve talked about this subject a few times and mentioned how important (and popular) the topic was at the various AWS boot camps I’ve had the pleasure of leading. I describe Infrastructure as Code as the process of decomposing the components of your solution into individual pieces, storing these pieces in a centralized code repository and managing them like we would manage our application code. When we need to build a solution, we can take these individual pieces and assemble them to create a complete solution on the AWS platform.
While Infrastructure as Code is a powerful method of building and maintaining infrastructure on AWS, it has one major issue - controlling drift.
What’s the difference between Infrastructure as Code and Infrastructure as Config?
In all likelihood, what you have deployed within your organization is Infrastructure as Config, not Infrastructure as Code. What’s the difference? Infrastructure as Config is static - once you have created your configuration templates and used them to deploy your solution that’s it. Over time that initial deployment drifts away from what is in your configuration files until at some point in the future it no longer resembles what you initially deployed.
The dynamic nature of AWS, and public cloud in general means that controlling drift can be a real challenge when you manage your infrastructure in configuration files.
On the other hand, Infrastructure as Code, allows you to not only control drift continuously but also enforce best practices and policy. You install a solution within your AWS account that not only deploys the initial solution but monitors the deployed infrastructure on an on-going basis to make sure that it does not drift away from the solution as it was architected. When something does happen to change, the solution recognizes the change and reverts it back to what is in your code. Monitoring and controlling your infrastructure in near real-time is true Infrastructure as Code, and in a dynamic environment like AWS, it’s value cannot be understated.
The Power of Fugue
Fugue is powerful, easy to use tool which is installed within your AWS account and immediately starts controlling drift continuously and automatically. Fugue is extremely easy to deploy, and its declarative programming language called Ludwig is easy to learn.
In the next article, we’ll get started with Fugue, by building a simple Multi-AZ Virtual Private Cloud (VPC).