Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Terraform Workshop
Search
Orlando Del Aguila
March 11, 2017
Programming
1
120
Terraform Workshop
Intro to Terraform workshop I gave for the Hacker Garage Community day 2017
Orlando Del Aguila
March 11, 2017
Tweet
Share
More Decks by Orlando Del Aguila
See All by Orlando Del Aguila
Open Source + Nonprofits = 💪
orlando
0
55
Web APIs 2019
orlando
0
85
Managing remote teams
orlando
0
52
How to be a Senior Software Engineer
orlando
0
100
Infrastructure as Code with Terraform
orlando
0
260
Concurrencia, Paralelismo y el Event-loop
orlando
0
290
Talking Web Apps
orlando
0
55
Web Launchpad - Chelajs
orlando
0
170
Web Launchpad
orlando
1
280
Other Decks in Programming
See All in Programming
Behind VS Code Extensions for JavaScript / TypeScript Linnting and Formatting
unvalley
6
1.2k
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
350
雑に思考を整理する技術と効能
konifar
63
30k
Native Federation: The Future of Micro Frontends in Angular
manfredsteyer
PRO
0
100
Milestoner
bkuhlmann
1
410
Deep Dive into React Stream/Serialize
mugi_uno
3
700
SIMD Parallel Programming with the Vector API
josepaumard
0
230
Ruby Pattern Matching
bkuhlmann
0
930
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
180
Let's learn code review
riofujimon
2
590
PHPはいつから死んでいるかの調査
chiroruxx
2
420
CREってこういうこと? 体験入社 - 提案資料 - / what-is-cre-trial-employment
shinden
1
530
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Debugging Ruby Performance
tmm1
70
11k
Designing the Hi-DPI Web
ddemaree
276
33k
Web development in the modern age
philhawksworth
203
10k
What the flash - Photography Introduction
edds
64
11k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
RailsConf 2023
tenderlove
9
560
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
155
14k
Side Projects
sachag
451
41k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
41
4.4k
Producing Creativity
orderedlist
PRO
338
39k
Transcript
Terraform Workshop Orlando Del Aguila Hash U
@orlando @eatcodetravel @eatcodetravel eatcodetravel.com
www.hashlabs.com
Overview
Commands
1. Init 2. Version 3. Get 4. Plan 5. Apply
Providers
Terraform / Provider provider "heroku"{ email = "
[email protected]
" api_key =
"my api key" }
Resources
Terraform / Resources resource "heroku_app" "example" { name = "my-super-heroku-app"
region = "us" }
Data Sources
Terraform / Data sources data "aws_ami" "ubuntu" { most_recent =
true filter { name = "name" values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-*"] } } resource "aws_instance" "example" { ami = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" }
Variables
Terraform / Variables variable “app_name" { default = “my-super-app-tf“ }
variable "heroku" { default = { email = “
[email protected]
" api_key = “123123" } } variable "list" { default = [“first”,”second”] }
Variable Interpolation
Terraform / Variables data "aws_ami" "ubuntu" { most_recent = true
filter { name = "name" values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-*"] } } resource "aws_instance" "example" { ami = "${data.aws_ami.ubuntu.id}" instance_type = "t2.micro" }
Interpolation functions
Terraform / Functions resource "heroku_app" "example" { name = "${uuid()}"
region = "us" }
Output Variables
Terraform / Functions output "git_url" "example" { value = "${heroku_app.example.git_url}"
}
Modules
Terraform / Modules variable "app_name" {} module "app"{ source =
"./heroku_app" app_name = "${var.app_name}" region = "us" }
State
Terraform / Modules https://gist.github.com/orlando/ 2fe57ff440d88655732008d731e3be02
Hands on
1. Install Terraform 2. Clone repository 3. Heroku account 4.
Heroku API key 5. Terraform.tfvars