1 Introduction Infrastructure as a Code Terraform - polganesh/terraform-examples GitHub Wiki

Introduction

Problem statement

Nowadays many organizations moving their applications to cloud distributed system. As application size grows it adds following challenges. As application size increases

  • Making changes in system infra is difficult.
  • Time to market is slow.
  • Reduces quality due to manual intervention.

Solution

Terraform help us to reduce or remove these challenges
Help us to write infrastructure as a code.

  • Consider we are using some cloud provider like AWS, Azure and we need to go to web console and install all things manually. Terraform help us avoid doing manual work and manage it with the help of code i.e. Automation of our infrastructure.
  • We can make our infrastructure auditable. I.e. we can keep infrastructure history in version control tools like GIT.

Why not use cloud formation?

Cloud formation provides the same facility but it is specific to AWS cloud. If an organization has multiple cloud providers (e.g. Azure, AWS, and Google cloud platform) then managing these things is a bit difficult. Terraform provides a similar approach for all cloud providers with minimal difference.

Role of various tools like Ansible, Chef, Puppet, salt stack and Terraform.

How to install terraform on windows?

  • Download terraform from https://www.terraform.io/docs/providers/
  • Once installed add โ€˜pathโ€™ of its binary to path variable of the system.
  • When terraform is installed on our machine we can create terraform configuration file (tf).in this file, we are maintaining all our infrastructure related code.