You may have heard a lot about Infrastructure as Code(IaC)!! Ever wondered what is it🤔
Let me take you through these terms🚀
Infrastructure as Code (IaC) is the managing and provisioning of infrastructure through code instead of through manual processes.
Let's understand it via the simple example of provisioning an instance on AWS manually, it's very simple to do up to 4-5 instances but what if you need to do these steps, again and again, to spin up or also delete 10-15 instances it would be a very hectic task right?
So what if we write these steps in a file and run that file according to our needs, it would be quite easy!! This is what exactly Infrastructure as Code does with some extra functionalities🤩
There are various IaC tools available in markets, but the most common and famous are:
1. Terraform by Hashicorp
2. AWS Cloud Formation
3. Azure Resource Manager (ARM)
4. Google Cloud Deployment Manager and many more.
I chose Terraform to continue to learn IaC! We will start our journey of learning Terraform and its concepts.🚀
Terraform is an open-source infrastructure as a code software tool that lets you build, change, and version cloud and on-prem resources safely and efficiently.
More about Terraform here: https://www.terraform.io/
Terraform is written in HCL (HashiCorp Configuration Language which is a declarative configuration language) and is designed to be both human and machine-readable.
Let's understand what is declarative language and the difference between imperative and declarative language.
👉🏽 Declarative Programming Languages are when you write your code in such a way that it describes what you want to do, and not how you want to do it.
Examples of declarative programming languages are SQL and Prolog.
👉🏽 In Imperative Programming Languages, we provide what we want to do with the steps of how we must do it. They describe explicitly which steps are to be performed in order to obtain the desired solution at the end.
Examples are Pascal, C, Java, etc.
Hashicorp Configuration Language is built using code configuration blocks that typically follow the following syntax:
We will learn more about Terraform in further parts of this series. 🤩💻