Terraform 101
Pradeep Loganathan
Resource Lifecycle
Terraform trend
• Declarative provisioning tool for IaC.
• Uses Hashicorp Configuration Language(HCL) or JSON.
• Helps to evolve infrastructure safely and predictably.
• Uses Graph theory to identify change dependencies.
• Multipurpose Composition tool
• Composes multiple tiers ( IAAS, PAAS, SAAS)
• Plugin based provider architecture.
• Opensource – Hashicorp / Hashicorp Tao
Terraform
Chef, Puppet, Ansible et all
Terraform Architecture
Terraform Workflow
Terraform Devops
Terraform - Provider
Provider
• The Provider block tells Terraform which API to
talk to with what permissions.
• Multiple providers can be used at any time for
multi-cloud environments.
• Credentials can be provided through
environmental variables.
Terraform – Initializing Providers
Terraform - Resources
Resources
• The resource block denotes the
resource to be created
• Resources can be anything that
the provider supports. Vnet, vpc,
ad group, azure pipeline etc
• Resources have standard and
specific properties. e.g. name, tag
Terraform - Data
Data
• Data sources allows for data to be
fetched or computed
• A data block is used to read data
from a data source and export to a
local identifier
• Each data resource is associated
with a single data source. This
determines the kind of object (or
objects) it reads and what query
constraint arguments are
available.
Terraform - Data
Terraform - Workflow
Terraform - Plan
Terraform - Plan
Terraform - Apply
Terraform - Apply
Terraform - Destroy
Terraform - Destroy
Terraform - Destroy
Backup
Terraform 101

Terraform 101