Why infrastructure as code is so popular

Why infrastructure as code (IaC) is so popular?

Last Updated on February 18, 2023 by cscontents

Introduction

In this article we will discuss “infrastructure as code” and why it is so popular. At first let’s try to understand what is infrastructure as code briefly.

What is infrastructure as code?

This is basically file format of your infrastructure. By the word “infrastructure” we understand it is something physical. But if we want to have a document or file format of the same infrastructure then we say, “infrastructure as code”. That means, we can describe/document the infrastructure with all its details like name, location, size etc. using code.

Why infrastructure as code is so popular?

Very briefly speaking, the requirement of on-demand infrastructure made “infrastructure as code” very popular. If we have infrastructure in code format, we can provision infrastructure very quickly When there is a demand. The waiting time will be very less.

Not only infra provisioning, if required we can delete/ destroy those infrastructures. That is once we are done with the infra, we can destroy those very quickly and release the space, capacity, and reduce the cost consumption etc.

So bottom line is “requirement of on-demand infrastructure” is fulfilled by “infrastructure as code”.

infrastructure as code

Advantages of infrastructure as code

Below are few major advantage –

  • We can provision infrastructure quickly when we have the requirement. That is on-demand infra provisioning.
  • We can destroy the infrastructure (if required) quickly to reduce cost.
  • Once we have the code for provisioning infrastructure, we can reuse them multiple times.

Disadvantages of infrastructure as code

There is no such disadvantage. But below point we need to consider –

  • We need to give enough time at the beginning while developing the code/script. Once code is developed we need to give enough to test those code/scripts.

Tools used for infrastructure as code

Below are the most popular tools available in the market –

  • Terraform – it is one of the most popular tool in the market. It supports almost all could provider.
  • Pulumi – This is a great tool in the domain of “infrastructure as code” and competitor of terraform.
  • Ansible – This is mainly configuration management tool. But we can use ansible also to write infrastructure code.

If you are new to terraform, then you can get a high level idea about terraform by going through below article.

Introduction to terraform – high level information

 

Thanks

 

If you are interested in learning DevOps, please have a look at the below articles, which will help you greatly.