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

PDF
PDF
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
PDF
Terraform-2.pdf
PDF
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
PDF
TIAD : Automating the modern datacenter
PDF
Terraform In Action Meap V10 Meap Scott Winkler
PPTX
Introduction To Terraform
PDF
Infrastructure as Code with Terraform
Hashicorp-Terraform-Deep-Dive-with-no-Fear-Victor-Turbinsky-Texuna.pdf
Terraform-2.pdf
OSDC 2015: Mitchell Hashimoto | Automating the Modern Datacenter, Development...
TIAD : Automating the modern datacenter
Terraform In Action Meap V10 Meap Scott Winkler
Introduction To Terraform
Infrastructure as Code with Terraform

Similar to What Is Terraform (20)

PPTX
Terraform: Taming the Machines Through Continuous Integration
PDF
Infrastructure as code terraformujeme cloud
PPTX
Infrastructure as code with terraform and packer
PDF
Infrastructure as Code with Terraform
PDF
Terraforming your Infrastructure on GCP
PDF
Terraform and cloud.ca
PPTX
Automation with Packer and TerraForm
PDF
Oracle Cloud - Infrastruktura jako kód
PDF
Building infrastructure with Terraform (Google)
PDF
A case study why Zoominfo uses Terraform Cloud in high-scale environment.
PPTX
Infrastructure as Code with Terraform.pptx
PDF
Instant download Terraform in Depth (MEAP V01) Robert Hafner pdf all chapter
PPTX
hidihofdiofyuhjhjjfhjhffjhfhhjfhhfhjfhjhjfhjfhjfjhfhjfjfhjhfhjffhjhjhjhjhjhjh...
PDF
OracleBeer_Terraform_soe.pdf
PPTX
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
PDF
Microservices with Terraform, Docker and the Cloud. Chicago Coders Conference...
PDF
Self-service PR-based Terraform
PPTX
Reusable, composable, battle-tested Terraform modules
PPTX
"Continuously delivering infrastructure using Terraform and Packer" training ...
PDF
Terraform in Depth (MEAP V01) Robert Hafner
Terraform: Taming the Machines Through Continuous Integration
Infrastructure as code terraformujeme cloud
Infrastructure as code with terraform and packer
Infrastructure as Code with Terraform
Terraforming your Infrastructure on GCP
Terraform and cloud.ca
Automation with Packer and TerraForm
Oracle Cloud - Infrastruktura jako kód
Building infrastructure with Terraform (Google)
A case study why Zoominfo uses Terraform Cloud in high-scale environment.
Infrastructure as Code with Terraform.pptx
Instant download Terraform in Depth (MEAP V01) Robert Hafner pdf all chapter
hidihofdiofyuhjhjjfhjhffjhfhhjfhhfhjfhjhjfhjfhjfjhfhjfjfhjhfhjffhjhjhjhjhjhjh...
OracleBeer_Terraform_soe.pdf
Aprovisionamiento multi-proveedor con Terraform - Plain Concepts DevOps day
Microservices with Terraform, Docker and the Cloud. Chicago Coders Conference...
Self-service PR-based Terraform
Reusable, composable, battle-tested Terraform modules
"Continuously delivering infrastructure using Terraform and Packer" training ...
Terraform in Depth (MEAP V01) Robert Hafner
Ad

More from AMELIAOLIVIA2 (20)

PDF
What Is Understanding AI vs ML vs DL
PDF
What Is Helm
PDF
What Is Skill Set
PDF
How It Works ZIP
PDF
What Is SQL Injection
PDF
What Is Deadlocks
PDF
What Is DOM
PDF
What Is AWS Elastic Kubernetes Service
PDF
AWS Vs Azure
PDF
What is DevOps
PDF
AWS Vs AZURE
PDF
What Is NPM
PDF
What is DJANGO
PDF
What is REST API
PDF
What is WEB 3.0
PDF
What is docker
PDF
What Is CORS
PDF
What is Coding Resources
PDF
What is an Algorithm
PDF
What Is Blockchain
What Is Understanding AI vs ML vs DL
What Is Helm
What Is Skill Set
How It Works ZIP
What Is SQL Injection
What Is Deadlocks
What Is DOM
What Is AWS Elastic Kubernetes Service
AWS Vs Azure
What is DevOps
AWS Vs AZURE
What Is NPM
What is DJANGO
What is REST API
What is WEB 3.0
What is docker
What Is CORS
What is Coding Resources
What is an Algorithm
What Is Blockchain
Ad

Recently uploaded (20)

PDF
CRP102_SAGALASSOS_Final_Projects_2025.pdf
PDF
Climate and Adaptation MCQs class 7 from chatgpt
PPTX
UNIT_2-__LIPIDS[1].pptx.................
PDF
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
PDF
Environmental Education MCQ BD2EE - Share Source.pdf
PDF
fundamentals-of-heat-and-mass-transfer-6th-edition_incropera.pdf
PDF
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
PDF
Comprehensive Lecture on the Appendix.pdf
PPTX
Thinking Routines and Learning Engagements.pptx
PDF
semiconductor packaging in vlsi design fab
PPT
REGULATION OF RESPIRATION lecture note 200L [Autosaved]-1-1.ppt
PDF
MA in English at Shiv Nadar University – Advanced Literature, Language & Rese...
PDF
Everyday Spelling and Grammar by Kathi Wyldeck
PDF
The TKT Course. Modules 1, 2, 3.for self study
PDF
Compact First Student's Book Cambridge Official
PDF
Race Reva University – Shaping Future Leaders in Artificial Intelligence
PDF
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
PPTX
Climate Change and Its Global Impact.pptx
DOCX
Cambridge-Practice-Tests-for-IELTS-12.docx
PDF
Journal of Dental Science - UDMY (2022).pdf
CRP102_SAGALASSOS_Final_Projects_2025.pdf
Climate and Adaptation MCQs class 7 from chatgpt
UNIT_2-__LIPIDS[1].pptx.................
LIFE & LIVING TRILOGY - PART - (2) THE PURPOSE OF LIFE.pdf
Environmental Education MCQ BD2EE - Share Source.pdf
fundamentals-of-heat-and-mass-transfer-6th-edition_incropera.pdf
LEARNERS WITH ADDITIONAL NEEDS ProfEd Topic
Comprehensive Lecture on the Appendix.pdf
Thinking Routines and Learning Engagements.pptx
semiconductor packaging in vlsi design fab
REGULATION OF RESPIRATION lecture note 200L [Autosaved]-1-1.ppt
MA in English at Shiv Nadar University – Advanced Literature, Language & Rese...
Everyday Spelling and Grammar by Kathi Wyldeck
The TKT Course. Modules 1, 2, 3.for self study
Compact First Student's Book Cambridge Official
Race Reva University – Shaping Future Leaders in Artificial Intelligence
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
Climate Change and Its Global Impact.pptx
Cambridge-Practice-Tests-for-IELTS-12.docx
Journal of Dental Science - UDMY (2022).pdf

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