Terraform Learnings

I would like to list my terraform day 1 learnings along with the detailed explanations of all the points.

  1. Terraform is an open source infrastructure as a code tool used to build infrastructure on cloud.
  2. We can create resources in multiple clouds using terraform. It uses declarative language.
  3. It is a tool developed by HashiCorp and it uses HashiCorp Configuration Language.

WHY TERRAFORM?

Terraform is widely used because of the following reasons:

  1. It helps to implement multi cloud strategy.
  2. It is time saving.
  3. The code is reusable in nature.

FEATURES OF TERRAFORM:

No alt text provided for this image


  1. Build on-premises infrastructure using terraform.
  2. It is used widely in deployment services.
  3. It is idempotent in nature i.e If there is one resource which is already installed, it will not install it again(which means it won't actually change anything).
  4. Automate infrastructure on any cloud.

HOW DOES TERRAFORM WORKS?

  1. Terraform creates and manages resources using the concept of Application Programming Interface(API).
  2. Terraform takes an immutable approach to infrastructure, reducing the complexity of upgrading or modifying the infrastructure.
  3. The following commands are widely used in terraform:

a. write-> Write the code and define the resources.

b. plan-> Check what is being created.

c. Apply-> Approval for performing the code in the correct order.



DIFFERENCE BETWEEN TERRAFORM AND ANSIBLE:

No alt text provided for this image


  1. BASED ON TYPE: Ansible is a configuration management tool whereas Terraform is a orchestration tool which is used to create and manage resources.
  2. BASED ON INFRASTRUCTURE: Ansible provides support for mutable infrastructure whereas Terraform supports immutable infrastructure.
  3. BASED ON LANGUAGE: Ansible follows a mixture of procedural and declarative languages(Define all the steps) whereas Terraform is based on declarative language.
  4. BASED ON PACKAGING AND TEMPLATING: Ansible provides complete support for packaging and templating whereas Terraform provides partial support for packaging and templating.
  5. BASED ON LIFECYCLE MANAGEMENT: Ansible does not have lifecycle management whereas Terraform is heavily dependent on lifecyle or state management.

THANKS FOR READING!!.

To view or add a comment, sign in

More articles by Aditya Jogwar

Others also viewed

Explore content categories