SlideShare a Scribd company logo
Terraform




Copyright thinkcloudly, All rights reserved 1
•Commandline tool (go) (OS X, Windows, Linux, …)

•Developed by Hashicorp (Vagrant, Packer, Consul, Nomad)

•Lets you describe and provision cloud infrastructure using
HCL formatted text files
•Servers, networks, load balancing, storage, containers
•Multi-provider (AWS, Azure, GC, Cloudstack, …)
Terraform
2
Copyright thinkcloudly, All rights reserved
•CloudStack @ Exoscale (Switzerland)

•Web servers (CentOS/Linux)
•Bastion host for management/provisioning

•SSH public/private key
•Run Apache httpd web server
•Domain name (DNS) (AWS)
3
Demo
Copyright thinkcloudly, All rights reserved
•A provider is used to connect to a cloud provider
•AWS, Azure, GC, Digital Ocean, Cloudstack, Openstack,
Heroku, CloudFoundry, Mailgun, easyDNS, CloudFlare…
•Providers know the APIs and expose available services
4
Provider (1)
Copyright thinkcloudly, All rights reserved
•A resource defines how to use a cloud resource/service
•VM, IP-address, load balancer, network, firewall, object
storage, DNS-record
•The name of the provider is used as a resource name prefix
•Resources have unique ids
•Combination of resource type and name
5
Resource (2)
Copyright thinkcloudly, All rights reserved
•A resource can depend on another resource

•Can determine the order of creation
6
Dependencies (3)
Copyright thinkcloudly, All rights reserved
•When manipulating resources, Terraform saves the current
state i a .tfstate file (or S3, Consul)
•Knows a resource's current state in the cloud
7
terraform show
terraform show
Copyright thinkcloudly, All rights reserved
8
•Variables
•Interpolation
•Functions (math, base64, join, lower, ...)
•Count
Syntax (4)
Copyright thinkcloudly, All rights reserved
9
•A provisioner lets you provision against the resource right
after creation
•chef
•remote-exec (script run on the server)
•local-exec (script run locally)
provisioner (5)
Copyright thinkcloudly, All rights reserved
•When resources have to be recreated from scratch, they
have to be tainted
terraform taint <resource_type>.<resource_id>
10
terraform taint
Copyright thinkcloudly, All rights reserved
11
•Connect to you web server through bastion host
•Limit access to bastion host to your IP range
•Use smart card to protect your private key
•E.g. yubikey as OpenPGP smartcard and gpg-agent
emulating ssh-agent
Security first! (6)
Copyright thinkcloudly, All rights reserved
12
Copyright thinkcloudly, All rights reserved
13
•Outputs lets you define values that will be output when
Terraform applies
•Can be queried easily:
terraform output [-json]
output (7)
Copyright thinkcloudly, All rights reserved
•Can connect resources from different cloud providers
•Unique feature in Terraform!
14
Multi-provider (8)
Copyright thinkcloudly, All rights reserved
Multi provider, multi datacenter,

multi technology (9)
15
•DNS using weighted record set
•Could have used latency / geolocation
•Health checks to determine data center (or service) outage
Copyright thinkcloudly, All rights reserved
•Dependency graphs can be generated dynamically
terraform graph | dot -Tpng | open -f -a Preview
16
Bonus: Dependency graph
Copyright thinkcloudly, All rights reserved
•Terraform is great for defining infrastructure as code
•Perform incremental changes to your infrastructure
•Can combine several cloud providers in your
17
Summary
Copyright thinkcloudly, All rights reserved

More Related Content

PPTX
After summit catch up
PDF
Microsoft Docker Meetup - Tutum Spring 2015
PPTX
#OSATH Deploy OpenStack: DevStack
PDF
Automated Hadoop Cluster Construction on EC2
PDF
Docker Insight
PDF
Haskell Tooling Whirlwind
PDF
CoreOS introduction - Johann Romefort
PDF
Environment for training models
After summit catch up
Microsoft Docker Meetup - Tutum Spring 2015
#OSATH Deploy OpenStack: DevStack
Automated Hadoop Cluster Construction on EC2
Docker Insight
Haskell Tooling Whirlwind
CoreOS introduction - Johann Romefort
Environment for training models

What's hot (20)

PDF
OpenStack Swift production deployments
PDF
Redis for .NET Developers
PPTX
#OSATH Deploy OpenStack: DevStack (cont'd)
PDF
Using Cinder Block Storage
PDF
Blockchain Workshop - Software Freedom Day 2017
PPTX
New microsoft power point presentation
PDF
CoreOS + Kubernetes @ All Things Open 2015
PPTX
Docker + Arm - Multi-arch builds with Docker `buildx`
PDF
Kubernetes on bare metal
PDF
Everyone Loves a Sausage
PDF
Functional Hostnames and Why they are Bad
PDF
Ether Mining 101
PDF
Introduction to Docker
PDF
Ether mining 101 v2
PPTX
CoreOS in a Nutshell
PDF
Boosting I/O Performance with KVM io_uring
PDF
Guava Overview Part 2 Bucharest JUG #2
PDF
Docker presentation | Paris Docker Meetup
PPTX
Backup using rsync
PPT
File server-info
OpenStack Swift production deployments
Redis for .NET Developers
#OSATH Deploy OpenStack: DevStack (cont'd)
Using Cinder Block Storage
Blockchain Workshop - Software Freedom Day 2017
New microsoft power point presentation
CoreOS + Kubernetes @ All Things Open 2015
Docker + Arm - Multi-arch builds with Docker `buildx`
Kubernetes on bare metal
Everyone Loves a Sausage
Functional Hostnames and Why they are Bad
Ether Mining 101
Introduction to Docker
Ether mining 101 v2
CoreOS in a Nutshell
Boosting I/O Performance with KVM io_uring
Guava Overview Part 2 Bucharest JUG #2
Docker presentation | Paris Docker Meetup
Backup using rsync
File server-info
Ad

Similar to Terraform 9 (20)

PDF
How we scale DroneCi on demand
PDF
Container Security
PDF
CoreOS automated MySQL Cluster Failover using Galera Cluster
PPTX
Structor - Automated Building of Virtual Hadoop Clusters
PDF
Tokyo OpenStack Summit 2015: Unraveling Docker Security
PDF
Unraveling Docker Security: Lessons From a Production Cloud
PPTX
Hadoop Operations
PDF
Containers - Portable, repeatable user-oriented application delivery. Build, ...
PPTX
Troubleshooting Kerberos in Hadoop: Taming the Beast
PDF
Burp suite
PPTX
Taking the open cloud to 11
PPTX
Docker Security
PPTX
Risk Management for Data: Secured and Governed
PPTX
Apache CloudStack from API to UI
PDF
DevOps Unleashed: Strategies that Speed Deployments
PPTX
Spark+flume seattle
PPTX
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
PDF
컨테이너 기술 소개 - Warden, Garden, Docker
PPTX
Cloudbreak - Technical Deep Dive
PPTX
Chicago Hashicorp User Group - Terraform Public Module Registry
How we scale DroneCi on demand
Container Security
CoreOS automated MySQL Cluster Failover using Galera Cluster
Structor - Automated Building of Virtual Hadoop Clusters
Tokyo OpenStack Summit 2015: Unraveling Docker Security
Unraveling Docker Security: Lessons From a Production Cloud
Hadoop Operations
Containers - Portable, repeatable user-oriented application delivery. Build, ...
Troubleshooting Kerberos in Hadoop: Taming the Beast
Burp suite
Taking the open cloud to 11
Docker Security
Risk Management for Data: Secured and Governed
Apache CloudStack from API to UI
DevOps Unleashed: Strategies that Speed Deployments
Spark+flume seattle
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
컨테이너 기술 소개 - Warden, Garden, Docker
Cloudbreak - Technical Deep Dive
Chicago Hashicorp User Group - Terraform Public Module Registry
Ad

More from Jerry Singh (14)

PDF
How it Works VPN?
PDF
What is VIM?
PDF
How it Work ZIP?
PDF
What is SAAS?
PDF
What is Data Structures?
PDF
What is Devops?
PDF
What is NPM?
PDF
What is Rest API?
PDF
What is WEB 3/O
PDF
WTF is CORS
PDF
What is Coding Resources?
PDF
What is Hadoop?
PDF
What is DOM?
PDF
SQL injection explained
How it Works VPN?
What is VIM?
How it Work ZIP?
What is SAAS?
What is Data Structures?
What is Devops?
What is NPM?
What is Rest API?
What is WEB 3/O
WTF is CORS
What is Coding Resources?
What is Hadoop?
What is DOM?
SQL injection explained

Recently uploaded (20)

PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PPTX
Introduction to pro and eukaryotes and differences.pptx
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
advance database management system book.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
AI-driven educational solutions for real-life interventions in the Philippine...
PDF
1_English_Language_Set_2.pdf probationary
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
Weekly quiz Compilation Jan -July 25.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
Hazard Identification & Risk Assessment .pdf
B.Sc. DS Unit 2 Software Engineering.pptx
Paper A Mock Exam 9_ Attempt review.pdf.
Τίμαιος είναι φιλοσοφικός διάλογος του Πλάτωνα
Share_Module_2_Power_conflict_and_negotiation.pptx
Introduction to pro and eukaryotes and differences.pptx
FORM 1 BIOLOGY MIND MAPS and their schemes
advance database management system book.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Unit 4 Computer Architecture Multicore Processor.pptx
AI-driven educational solutions for real-life interventions in the Philippine...
1_English_Language_Set_2.pdf probationary
Indian roads congress 037 - 2012 Flexible pavement
LDMMIA Reiki Yoga Finals Review Spring Summer
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
TNA_Presentation-1-Final(SAVE)) (1).pptx

Terraform 9

  • 2. •Commandline tool (go) (OS X, Windows, Linux, …) •Developed by Hashicorp (Vagrant, Packer, Consul, Nomad) •Lets you describe and provision cloud infrastructure using HCL formatted text files •Servers, networks, load balancing, storage, containers •Multi-provider (AWS, Azure, GC, Cloudstack, …) Terraform 2 Copyright thinkcloudly, All rights reserved
  • 3. •CloudStack @ Exoscale (Switzerland) •Web servers (CentOS/Linux) •Bastion host for management/provisioning •SSH public/private key •Run Apache httpd web server •Domain name (DNS) (AWS) 3 Demo Copyright thinkcloudly, All rights reserved
  • 4. •A provider is used to connect to a cloud provider •AWS, Azure, GC, Digital Ocean, Cloudstack, Openstack, Heroku, CloudFoundry, Mailgun, easyDNS, CloudFlare… •Providers know the APIs and expose available services 4 Provider (1) Copyright thinkcloudly, All rights reserved
  • 5. •A resource defines how to use a cloud resource/service •VM, IP-address, load balancer, network, firewall, object storage, DNS-record •The name of the provider is used as a resource name prefix •Resources have unique ids •Combination of resource type and name 5 Resource (2) Copyright thinkcloudly, All rights reserved
  • 6. •A resource can depend on another resource •Can determine the order of creation 6 Dependencies (3) Copyright thinkcloudly, All rights reserved
  • 7. •When manipulating resources, Terraform saves the current state i a .tfstate file (or S3, Consul) •Knows a resource's current state in the cloud 7 terraform show terraform show Copyright thinkcloudly, All rights reserved
  • 8. 8 •Variables •Interpolation •Functions (math, base64, join, lower, ...) •Count Syntax (4) Copyright thinkcloudly, All rights reserved
  • 9. 9 •A provisioner lets you provision against the resource right after creation •chef •remote-exec (script run on the server) •local-exec (script run locally) provisioner (5) Copyright thinkcloudly, All rights reserved
  • 10. •When resources have to be recreated from scratch, they have to be tainted terraform taint <resource_type>.<resource_id> 10 terraform taint Copyright thinkcloudly, All rights reserved
  • 11. 11 •Connect to you web server through bastion host •Limit access to bastion host to your IP range •Use smart card to protect your private key •E.g. yubikey as OpenPGP smartcard and gpg-agent emulating ssh-agent Security first! (6) Copyright thinkcloudly, All rights reserved
  • 13. 13 •Outputs lets you define values that will be output when Terraform applies •Can be queried easily: terraform output [-json] output (7) Copyright thinkcloudly, All rights reserved
  • 14. •Can connect resources from different cloud providers •Unique feature in Terraform! 14 Multi-provider (8) Copyright thinkcloudly, All rights reserved
  • 15. Multi provider, multi datacenter, multi technology (9) 15 •DNS using weighted record set •Could have used latency / geolocation •Health checks to determine data center (or service) outage Copyright thinkcloudly, All rights reserved
  • 16. •Dependency graphs can be generated dynamically terraform graph | dot -Tpng | open -f -a Preview 16 Bonus: Dependency graph Copyright thinkcloudly, All rights reserved
  • 17. •Terraform is great for defining infrastructure as code •Perform incremental changes to your infrastructure •Can combine several cloud providers in your 17 Summary Copyright thinkcloudly, All rights reserved