Skip to content

What is Infrastructure as Code?

    Infrastructure As Code

    Today, I try to explain Infrastructure as Code (IaC) in a metaphoric way: Do you like cooking? Imagine you’re tasked with preparing a gourmet dinner, and you have two options:

    πŸ‘©β€πŸ³ Infrastructure as Code (IaC) or: The Recipe

    You decide to cook from scratch, using a well-documented recipe. In this scenario, you gather all the necessary ingredients, follow a detailed set of instructions, and put your culinary skills to work. You have the flexibility to adjust the recipe, change ingredients, and customize the meal to your liking. If you want to scale up the meal to serve more people, you can simply adjust the quantities and follow the same instructions. The recipe acts as a blueprint for your culinary infrastructure. It’s efficient, repeatable, and you can version control it to keep track of changes or replicate the same dish in the future.

    Advantages πŸ’Ύ

    Control: You have complete control over the ingredients, the cooking process, and the final result.
    Flexibility: You can easily modify the recipe to suit your preferences.
    Scalability: You can cook the same meal as many times as you want, ensuring consistency and quality.

    πŸ” UI Configuration or: Ordering from a Menu

    Alternatively, you could opt for the convenient way and order food from a fast-food menu. You select your desired items, specify a few options, and within minutes, your meal arrives. It’s quick and easy, but you have limited control over the ingredients, the cooking process, and the final taste. If you need to make changes or scale up, you may need to place a new order, and the result may not be exactly as you envisioned. You’re at the mercy of the pre-defined options provided by the menu.

    Advantages πŸ₯

    Speed: It’s fast and requires minimal effort.
    Simplicity: You don’t need to worry about the details of the cooking process.

    In this example, Infrastructure as Code (the recipe) offers the advantages of control, flexibility, and scalability, much like its real-world counterpart in the tech industry. You define your infrastructure, make changes as needed, and easily recreate it, all while having a clear, documented process. On the other hand, UI configuration (ordering from a menu) may be faster and simpler initially, but it lacks the control and flexibility that IaC provides, making it less suitable for complex or scalable systems. And I think I don’t need to mention which is the healthier approach 😜

    So, I hope that educated and entertained you a bit. Have a great day!