KEMBAR78
Building Repeatable Infrastructure using Terraform | PPTX
Build Repeatable
Infrastructure
usingTerraform
Jeeva S. Chelladhurai
Founder, Comorin Consulting Services
https://www.linkedin.com/in/jeevachelladhurai/
IT.then
■ Manual
■ Downtime
■ People Dependent
■ Misconfiguration
■ Not Repeatable
IT.now
■ Automated
■ Version Controlled
■ CI/CD
■ Infrastructure as Code
■ Repeatable
■ Why
– Declarative
– Provider-agnostic
– Codify the Infrastructure (IaC)
– Plan before execute
– Resource Graph
– Change Automation
■ What
– Open Source
– Started in 2014
– Written in Go
– Pluggable
ARCHITECTURE
ARCHITECTURE
• Read configuration
• Build dependency graph
• https://github.com/hashicorp/terraform
ARCHITECTURE
• External Static binaries
• RPC -> Between Core and Plugin
• Provider comes as plugins
• Implements Provider’s CRUD
Install
■ Download appropriate zip from
https://www.terraform.io/downloads.html
■ Unzip the downloaded file, move the file
terraform to any path of your choice
■ Verify installation by launching terraform
from a terminal
TerraformConfiguration
■ Terraform Format or JSON
– HCL – Hashicorp Configuration Language (recommended)
– Extension .tf
– .tf.json for JSON (only if produced by machines)
■ Text file, can be version controlled
■ Human readable format
■ Describes the Infrastructure
■ Declarative
Resource
Configuration
Provider Configuration
■ Manage the life-cycle of resources (CRUD)
■ Provider configuration
– Keys / Password
– Endpoint address
■ Resources are prefixed with providers
– aws_instance, vsphere_virtual_machine
■ Initialize to download provider plugging
provider "aws" {
access_key = “xxxx"
secret_key = “zzzzz"
region = "us-east-1"
}
Output Configuration
■ Response values to be highlighted to the user
Configuration
resource
HANDS-ON
Thanks
Jeeva S. Chelladhurai
jeeva@comorin.co
Comorin Consulting Service
BlockChain, MicroService Architecture,
Machine Learning, DevOps, Automation
https://www.linkedin.com/in/jeevachelladhurai/

Building Repeatable Infrastructure using Terraform