An Introduction to Infrastructure as Code
"IaC" or Infrastructure as Code, is simply the ability to provision, manage and support your computing infrastructure through code, as opposed to doing it manually. What this means is that instead of going to the console of the cloud provider you're using and provisioning instances from there, you'd instead have files with chunks of code that specify the desired configuration of your resource, which would then have to be run in order to deploy the resource.
Largely, there's two ways of using IaC - Declarative and Imperative. In the Declarative approach, you "declare" the end desired state of your solution in your code, and the IaC tool takes care of getting to that state. So, for a certain set of deployment commands, the IaC tool will always produce the same exact output regardless of target environment, meaning that you have a guarantee that the tool will produce identical results across environments. This makes the Declarative approach of IaC "Idempotent" - meaning that for a given operation, you have a guarantee that you'll always get the same results.
So ultimately we need to ask - "Why would you want to use IaC and what are the benefits of it?"
IaC is a desirable tool for all the benefits it provides. I've listed a few below.
Recommended by LinkedIn
Keeping the above the points in mind, we can see how IaC is a practice that will greatly assist us in building consistent and compliant architecture with ease and speed, and why it is a great concept to become familiar with.
Well said!