Deploying Infrastructure using
Terraform
Pradeep Bhadani
Founder, Cloud Native Technologies
cntek.io
pbhadani.com
linkedin.com/in/pradeepbhadani
linkedin.com/company/cloudnativetech
6th September 2022, GDG Wroclaw
About Me
IT Consultant with 11+ years of experience in Big Data, Cloud & DevOps
GDE (Google Developers Expert) - Cloud
Google Cloud Authorized Trainer
Google Cloud Innovator Champion
Blog: pbhadani.com
Cloud Native Technologies
cntek.io
Services
● Big Data Consultancy
● Cloud & DevOps Consultancy
● Tailored Training and Workshops
Cloud Native Technologies
cntek.io
Agenda
● Infrastructure Automation
● Introduction to Terraform
● Workstation setup
● Demo: Provision resources
Cloud Native Technologies
cntek.io
Building & managing infrastructure using scripts, code with no-human or
minimal intervention
Infrastructure Automation
Cloud Native Technologies
cntek.io
Faster delivery Improved Reliability Reduced cost Collaboration
Terraform Chef Puppet Salt
An approach to manage Systems, Networks or any other Infrastructure objects
through source code
Infrastructure as Code (IAC)
Cloud Native Technologies
cntek.io
Consistent Repeatable Change Collaboration
Terraform
Terraform allows to build, change and version our infrastructure in an easy and
efficient way.
terraform.io
Cloud Native Technologies
cntek.io
Open Source
● Open Source and written in golang
github.com/hashicorp/terraform
Cloud Native Technologies
cntek.io
Terraform features
Cloud Native Technologies
cntek.io
Platform agnostic State management Infer dependencies
Execution plan Resource graph Parallel execution
Concepts
Cloud Native Technologies
cntek.io
Plugin to translate API interaction with the service
Authenticate Terraform against Service
Provider
Cloud Native Technologies
cntek.io
Provider Name
Attributes
Providers
Cloud Native Technologies
cntek.io
35official
200+ verified
and many more community providers…
Ref: https://registry.terraform.io/browse/providers
Describe infrastructure object(s)
Resource
Cloud Native Technologies
cntek.io
Resource type
Attributes
Read infrastructure information
Data Source
Cloud Native Technologies
cntek.io
Name
Arguments
Stores information about infrastructure created by Terraform code
○ Local: Stores on local filesystem
○ Remote: Stores on remote storage
■ GCS
■ S3
■ Consul
■ ….
State
Cloud Native Technologies
cntek.io
Lifecycle
Cloud Native Technologies
cntek.io
Write Code
Cloud Native Technologies
cntek.io
Initialize (terraform init)
Cloud Native Technologies
cntek.io
Execution Plan (terraform plan)
Cloud Native Technologies
cntek.io
Apply (terraform apply)
Cloud Native Technologies
cntek.io
Cleanup (terraform destroy)
Cloud Native Technologies
cntek.io
Workstation
Setup
Cloud Native Technologies
cntek.io
Terraform Setup (Mac Users)
Cloud Native Technologies
cntek.io
Blog: Getting started with Terraform
Terraform Setup (Linux Users)
Cloud Native Technologies
cntek.io
Blog: Getting started with Terraform
gcloud setup
Cloud Native Technologies
cntek.io
Blog: Getting started with Google Cloud SDK
Architecture Diagram
Demo
https://github.com/pradeepbhadani/terraform-webserver
Photo by Chris Ried on Unsplash
Image by TeroVesalainen from Pixabay
pbhadani.com
pradeepbhadani
pradeepbhadani
bhadanipradeep
bit.ly/cntek-youtube
cntek.io
CloudNativeTech
CloudNativeTech
cntekio
bit.ly/cntek-youtube

GDG_Wroclaw_ Deploying_Cloud_Infrastructure_using_Terraform.pdf