Terraform is an infra management tool made by Hashicorp. It helps in provision, managing and maintaining cloud resources. Terraform is not a config management tool.
Features
- Terraform deploys pre-made server images.
- Base server images can be created with Packer, another open-source tool by Hashicorp.
- Immutable infrastructure
- Disposable infrastructure - freely delete and replace any instance
- It can work with Docker and Kubernetes. It can also interact with AWS EKS.
- Terraform figures out the hard part of resource ordering and lets you treat the infrastructure as static code.
Housekeeping
Internal working
- Terraform uses DAG(Directed Acyclic Graphs)
- Where the each node represents a service and the nodes are not cyclic or interdependent with each other.
Complete Terraform Course - From BEGINNER to PRO! (Learn Infrastructure as Code)
source: https://www.youtube.com/watch?v=7xngnjfIlK4
Introduction
There are three approaches to provisioning cloud resources:
- GUI
- API/CLI
- IaC
Categories of IaC:
- Ad Hoc scripts
- Config management tools like Ansible
- Server templating tools
- Orchestration tools like k8s
- Provisioning tools
Two types of tools: - Declarative tools like SQL
- Imperative
- Here, you specify a sequence of instructions.
Terraform and Pulumi are Cloud agnostic tools.
- Here, you specify a sequence of instructions.
Terraform overview and setup
- Terraform is a tool for safely building, changing, and versioning infrastructure.
- Enables application software best practices for infrastructure
- Compatible with many clouds and services
!800