Terraform
Infrastructure as Code for Mere Mortals
What’s the scenario?
● Provisioning Resources
○ What you need to deliver your solution
● Planning Updates
○ Things can change, so what?
● Using Source Control
○ Keep tracking of all changes and the big picture
Terraform Components
● Terraform Executable
○ Download, add to the path and let’s play!
● Terraform File
○ Where you design your infrastructure. (*.tf)
● Terraform State
○ Records the state of our infrastructure. (*.tfstate)
Terraform Components
● Variables
○ Used to replace placeholders
● Providers and Credentials
○ Basic configuration to interact with some Cloud Provider
● Resources
○ The infrastructure per se hosted in a provider
Terraform Components - Variables example
# Variables Example
variable “aws_access_key” {}
variable “aws_secret_key” {}
variable “private_key_path” {}
variable “key_name” {
default = “ExampleKey”
}
Terraform Components - Providers example
# Providers Example
provider “aws” {
access_key = “${var.aws_access_key}”
secret_key = “${var.aws_access_key}”
region = “us-east-1”
}
Terraform Components - Resources example
# Resources Example
resourcer “aws_instance” “resource_name” {
ami = “ami-c5866s22”
instance_type = “m3-large”
key_name = “${var.key_name}”
...
}
Terraform Components - Output example
# Output Example
output “aws_instance_public_dns” {
value = “${aws_instance.foo_instance.public_dns}”
}
Terraform Components - Terraform executable
(Planning)
$ terraform plan - Shows what will be done
(Provisioning)
$ terraform apply - Apply the what is in the code
(Deprovisioning)
$ terraform destroy - Destroy the what is in the code

More Related Content

PDF
Let's Compare: A Benchmark review of InfluxDB and Elasticsearch
PDF
Time Series Data with InfluxDB
PPT
ApexMeetup Geode - Talk2 2016-03-17
PDF
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLON
PDF
Downsampling your data October 2017
PDF
Apache Flink Training Workshop @ HadoopCon2016 - #2 DataSet API Hands-On
PDF
Influxdb and time series data
PDF
Xephon K A Time series database with multiple backends
Let's Compare: A Benchmark review of InfluxDB and Elasticsearch
Time Series Data with InfluxDB
ApexMeetup Geode - Talk2 2016-03-17
Paul Dix (Founder InfluxDB) - Organising Metrics at #DOXLON
Downsampling your data October 2017
Apache Flink Training Workshop @ HadoopCon2016 - #2 DataSet API Hands-On
Influxdb and time series data
Xephon K A Time series database with multiple backends

What's hot (20)

PDF
Devoxx france 2015 influxdb
PDF
Getting Ready to Move to InfluxDB 2.0 | Tim Hall | InfluxData
PDF
Toku DB by Aswin
PDF
Flux and InfluxDB 2.0
PDF
Ali Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLON
PDF
Etcd terraform by Alex Somesan
PDF
Collect distributed application logging using fluentd (EFK stack)
PDF
Flux and InfluxDB 2.0 by Paul Dix
PDF
Apache Tajo on Swift: Bringing SQL to the OpenStack World
PDF
Optimizing the Grafana Platform for Flux
PDF
Monitoring InfluxEnterprise
PDF
Statim, time series interface for Perl.
PDF
Getting started with influx Db and Grafana Installation Guide
PDF
Introduction to Apache Tajo: Data Warehouse for Big Data
PDF
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
PDF
DevOps Braga #9: Introdução ao Terraform
PDF
Wayfair Use Case: The four R's of Metrics Delivery
PDF
Chronix as Long-Term Storage for Prometheus
PDF
Tajo case study bay area hug 20131105
PDF
Declarative Infrastructure Tools
Devoxx france 2015 influxdb
Getting Ready to Move to InfluxDB 2.0 | Tim Hall | InfluxData
Toku DB by Aswin
Flux and InfluxDB 2.0
Ali Asad Lotia (DevOps at Beamly) - Riemann Stream Processing at #DOXLON
Etcd terraform by Alex Somesan
Collect distributed application logging using fluentd (EFK stack)
Flux and InfluxDB 2.0 by Paul Dix
Apache Tajo on Swift: Bringing SQL to the OpenStack World
Optimizing the Grafana Platform for Flux
Monitoring InfluxEnterprise
Statim, time series interface for Perl.
Getting started with influx Db and Grafana Installation Guide
Introduction to Apache Tajo: Data Warehouse for Big Data
Analytics at Speed: Introduction to ClickHouse and Common Use Cases. By Mikha...
DevOps Braga #9: Introdução ao Terraform
Wayfair Use Case: The four R's of Metrics Delivery
Chronix as Long-Term Storage for Prometheus
Tajo case study bay area hug 20131105
Declarative Infrastructure Tools
Ad

Similar to Terraform infrastructure as code for mere mortals (20)

PDF
Configuration management II - Terraform
PDF
leboncoin DataEngineering / Terraform - beginner to advanced
PDF
Deploy resources on Azure using IaC (Azure Terraform)
PPTX
Introduction to basics of Terraform.pptx
PPTX
Terraform
PPTX
Hashicorp-Certified-Terraform-Associate_V1
PDF
OracleBeer_Terraform_soe.pdf
PPTX
Introduction To Terraform
PPTX
Terraform training 🎒 - Basic
PDF
The hitchhiker's guide to terraform your infrastructure
PDF
Terraforming your Infrastructure on GCP
PPTX
02 terraform core concepts
PDF
DevOps Online Training | DevOps Training
PPTX
Provisioning Infrastructure Using Terraform
PDF
Infrastructure as Code with Terraform
PPTX
Terraform day1
PDF
Terraform on Oracle Cloud Infrastructure: A Primer for Database Administrators
PDF
Introduction to IAC and Terraform
PPTX
Infrastructure as code with terraform and packer
PPTX
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)
Configuration management II - Terraform
leboncoin DataEngineering / Terraform - beginner to advanced
Deploy resources on Azure using IaC (Azure Terraform)
Introduction to basics of Terraform.pptx
Terraform
Hashicorp-Certified-Terraform-Associate_V1
OracleBeer_Terraform_soe.pdf
Introduction To Terraform
Terraform training 🎒 - Basic
The hitchhiker's guide to terraform your infrastructure
Terraforming your Infrastructure on GCP
02 terraform core concepts
DevOps Online Training | DevOps Training
Provisioning Infrastructure Using Terraform
Infrastructure as Code with Terraform
Terraform day1
Terraform on Oracle Cloud Infrastructure: A Primer for Database Administrators
Introduction to IAC and Terraform
Infrastructure as code with terraform and packer
Infrastructure-as-Code (IaC) Using Terraform (Advanced Edition)
Ad

More from Anderson Carvalho (6)

PDF
Modern infrastructure as code
PDF
Cloud Native Patterns Using AWS
PPTX
Cloud Native Patterns Using AWS - Practical Examples
PPTX
Microservices
PPTX
O auth2 e open id connect
PPTX
Amazon web services (aws) main developer services
Modern infrastructure as code
Cloud Native Patterns Using AWS
Cloud Native Patterns Using AWS - Practical Examples
Microservices
O auth2 e open id connect
Amazon web services (aws) main developer services

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
Benefits of Physical activity for teenagers.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Hybrid model detection and classification of lung cancer
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
CloudStack 4.21: First Look Webinar slides
PPT
What is a Computer? Input Devices /output devices
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
DOCX
search engine optimization ppt fir known well about this
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Web Crawler for Trend Tracking Gen Z Insights.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Getting Started with Data Integration: FME Form 101
Taming the Chaos: How to Turn Unstructured Data into Decisions
1 - Historical Antecedents, Social Consideration.pdf
Benefits of Physical activity for teenagers.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Hybrid model detection and classification of lung cancer
observCloud-Native Containerability and monitoring.pptx
A novel scalable deep ensemble learning framework for big data classification...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
CloudStack 4.21: First Look Webinar slides
What is a Computer? Input Devices /output devices
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Enhancing emotion recognition model for a student engagement use case through...
A comparative study of natural language inference in Swahili using monolingua...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
search engine optimization ppt fir known well about this
Final SEM Unit 1 for mit wpu at pune .pptx

Terraform infrastructure as code for mere mortals

  • 2. What’s the scenario? ● Provisioning Resources ○ What you need to deliver your solution ● Planning Updates ○ Things can change, so what? ● Using Source Control ○ Keep tracking of all changes and the big picture
  • 3. Terraform Components ● Terraform Executable ○ Download, add to the path and let’s play! ● Terraform File ○ Where you design your infrastructure. (*.tf) ● Terraform State ○ Records the state of our infrastructure. (*.tfstate)
  • 4. Terraform Components ● Variables ○ Used to replace placeholders ● Providers and Credentials ○ Basic configuration to interact with some Cloud Provider ● Resources ○ The infrastructure per se hosted in a provider
  • 5. Terraform Components - Variables example # Variables Example variable “aws_access_key” {} variable “aws_secret_key” {} variable “private_key_path” {} variable “key_name” { default = “ExampleKey” }
  • 6. Terraform Components - Providers example # Providers Example provider “aws” { access_key = “${var.aws_access_key}” secret_key = “${var.aws_access_key}” region = “us-east-1” }
  • 7. Terraform Components - Resources example # Resources Example resourcer “aws_instance” “resource_name” { ami = “ami-c5866s22” instance_type = “m3-large” key_name = “${var.key_name}” ... }
  • 8. Terraform Components - Output example # Output Example output “aws_instance_public_dns” { value = “${aws_instance.foo_instance.public_dns}” }
  • 9. Terraform Components - Terraform executable (Planning) $ terraform plan - Shows what will be done (Provisioning) $ terraform apply - Apply the what is in the code (Deprovisioning) $ terraform destroy - Destroy the what is in the code