SlideShare a Scribd company logo
1 of 17
Download to read offline
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

Similar to What is Terraform?

Facing enterprise specific challenges – utility programming in hadoop
Facing enterprise specific challenges – utility programming in hadoopFacing enterprise specific challenges – utility programming in hadoop
Facing enterprise specific challenges – utility programming in hadoop
fann wu
 

Similar to What is Terraform? (20)

Troubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the BeastTroubleshooting Kerberos in Hadoop: Taming the Beast
Troubleshooting Kerberos in Hadoop: Taming the Beast
 
Burp suite
Burp suiteBurp suite
Burp suite
 
Taking the open cloud to 11
Taking the open cloud to 11Taking the open cloud to 11
Taking the open cloud to 11
 
Docker Security
Docker SecurityDocker Security
Docker Security
 
Risk Management for Data: Secured and Governed
Risk Management for Data: Secured and GovernedRisk Management for Data: Secured and Governed
Risk Management for Data: Secured and Governed
 
Apache CloudStack from API to UI
Apache CloudStack from API to UIApache CloudStack from API to UI
Apache CloudStack from API to UI
 
DevOps Unleashed: Strategies that Speed Deployments
DevOps Unleashed: Strategies that Speed DeploymentsDevOps Unleashed: Strategies that Speed Deployments
DevOps Unleashed: Strategies that Speed Deployments
 
Spark+flume seattle
Spark+flume seattleSpark+flume seattle
Spark+flume seattle
 
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
Deploying and managing SolrCloud in the cloud using the Solr Scale ToolkitDeploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
Deploying and managing SolrCloud in the cloud using the Solr Scale Toolkit
 
컨테이너 기술 소개 - Warden, Garden, Docker
컨테이너 기술 소개 - Warden, Garden, Docker컨테이너 기술 소개 - Warden, Garden, Docker
컨테이너 기술 소개 - Warden, Garden, Docker
 
Cloudbreak - Technical Deep Dive
Cloudbreak - Technical Deep DiveCloudbreak - Technical Deep Dive
Cloudbreak - Technical Deep Dive
 
Chicago Hashicorp User Group - Terraform Public Module Registry
Chicago Hashicorp User Group - Terraform Public Module RegistryChicago Hashicorp User Group - Terraform Public Module Registry
Chicago Hashicorp User Group - Terraform Public Module Registry
 
Facing enterprise specific challenges – utility programming in hadoop
Facing enterprise specific challenges – utility programming in hadoopFacing enterprise specific challenges – utility programming in hadoop
Facing enterprise specific challenges – utility programming in hadoop
 
Oracle RAC and Docker: The Why and How
Oracle RAC and Docker: The Why and HowOracle RAC and Docker: The Why and How
Oracle RAC and Docker: The Why and How
 
Deployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS LinuxDeployment of WebObjects applications on CentOS Linux
Deployment of WebObjects applications on CentOS Linux
 
Apache CloudStack: API to UI (STLLUG)
Apache CloudStack: API to UI (STLLUG)Apache CloudStack: API to UI (STLLUG)
Apache CloudStack: API to UI (STLLUG)
 
Docker, Atomic Host and Kubernetes.
Docker, Atomic Host and Kubernetes.Docker, Atomic Host and Kubernetes.
Docker, Atomic Host and Kubernetes.
 
Webinar - Getting Started With Ceph
Webinar - Getting Started With CephWebinar - Getting Started With Ceph
Webinar - Getting Started With Ceph
 
Clocker - The Docker Cloud Maker
Clocker - The Docker Cloud MakerClocker - The Docker Cloud Maker
Clocker - The Docker Cloud Maker
 
On Docker and its use for LHC at CERN
On Docker and its use for LHC at CERNOn Docker and its use for LHC at CERN
On Docker and its use for LHC at CERN
 

More from BelleHenry

More from BelleHenry (6)

Azure Web Apps: What it is and how to get started
Azure Web Apps: What it is and how to get started Azure Web Apps: What it is and how to get started
Azure Web Apps: What it is and how to get started
 
AWS Application Load balancer
AWS Application Load balancerAWS Application Load balancer
AWS Application Load balancer
 
How It Works ZIP?
How It Works ZIP?How It Works ZIP?
How It Works ZIP?
 
Java Developer Skills Set
Java Developer Skills SetJava Developer Skills Set
Java Developer Skills Set
 
Understanding AI vs ML vs DL
Understanding AI vs ML vs DLUnderstanding AI vs ML vs DL
Understanding AI vs ML vs DL
 
What is Helm?
What is Helm?What is Helm?
What is Helm?
 

Recently uploaded

SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 

What is Terraform?

  • 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