Quick Concepts Learning : Learn Terraform (Important Terms) in minutes

 What is Terraform?

Terraform is an open-source infrastructure as a code (IAC) tool that allows to create, manage & deploy the production-ready environment. Terraform codifies cloud APIs into declarative configuration files. Terraform can manage both existing service providers and custom in-house solutions.


What are the advantages in using Terraform or IaC (Infrastructure as a code) in general?

✅ Full automation: 

In the past, resource creation, modification and removal were handled manually or by using a set of tooling. With Terraform or other IaC technologies, you manage the full lifecycle in an automated fashion.

✅ Modular and Reusable: 

Code that you write for certain purposes can be used and assembled in different ways. You can write code to create resources on a public cloud and it can be shared with other teams who can also use it in their account on the same (or different) cloud>

✅ Improved testing: 

Concepts like CI can be easily applied on IaC based projects and code snippets. This allow you to test and verify operations beforehand


What are some of Terraform features?

⚡️Declarative: 

Terraform uses the declarative approach (rather than the procedural one) in order to define end-status of the resources

⚡️No agents: 

as opposed to other technologies (e.g. Puppet) where you use a model of agent and server, with Terraform you use the different APIs (of clouds, services, etc.) to perform the operations

⚡️Community: 

Terraform has strong community who constantly publishes modules and fixes when needed. This ensures there is good modules maintenance and users can get support quite quickly at any point


In what language infrastructure in Terraform is defined?

HCL (Hashiciorp Configuration Language). A declarative language for defining infrastructure.


What's a typical Terraform workflow?

📌 Write Terraform definitions: 

.tf files written in HCL that described the desired infrastructure state

📌 Review: 

With command such as terraform plan you can get a glance at what Terraform will perform with the written definitions

📌 Apply definitions: 

With the command terraform apply Terraform will apply the given definitions, by adding, modifying or removing the resources


What are some use cases for using Terraform?

⚡️ Multi-cloud environment: 

You manage infrastructure on different clouds, but looking for a consistent way to do it across the clouds

⚡️ Consistent environments: 

You manage environments such as test, production, staging,  and looking for a way to have them consistent so any modification in one of them, applies to other environments as well


What's the difference between Terraform and technologies such as Ansible, Puppet, Chef, etc.

Terraform is considered to be an IaC technology. It's used for provisioning resources, for managing infrastructure on different platforms.

Ansible, Puppet and Chef are Configuration Management technologies. They are used once there is an instance running and you would like to apply some configuration on it like installing an application, applying security policy, etc.



Comments

Popular posts from this blog

Free Courses - Git & GitHub (DevOps)

6 FREE courses to learn AWS & AWS DevOps (Concepts + Hands-on + Interview)