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
160
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
88
Web APIs 2019
orlando
0
140
Managing remote teams
orlando
0
70
How to be a Senior Software Engineer
orlando
0
150
Infrastructure as Code with Terraform
orlando
0
290
Concurrencia, Paralelismo y el Event-loop
orlando
0
360
Talking Web Apps
orlando
0
100
Web Launchpad - Chelajs
orlando
0
220
Web Launchpad
orlando
1
330
Other Decks in Programming
See All in Programming
Register is more than clipboard
satorunooshie
1
420
CSC305 Lecture 13
javiergs
PRO
0
370
組織もソフトウェアも難しく考えない、もっとシンプルな考え方で設計する #phpconfuk
o0h
PRO
8
3.2k
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
400
Health Kit × Foundation Models でAIコーチを作ってみた
ryunakayama
0
100
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
220
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
150
Eloquentを使ってどこまでコードの治安を保てるのか?を新人が考察してみた
itokoh0405
0
3.1k
詳細の決定を遅らせつつ実装を早くする
shimabox
1
780
ドメイン駆動設計のエッセンス
masuda220
PRO
15
7.5k
CSC305 Lecture 14
javiergs
PRO
0
230
PHPライセンス変更の議論を通じて学ぶOSSライセンスの基礎
matsuo_atsushi
0
110
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Building a Scalable Design System with Sketch
lauravandoore
463
33k
Site-Speed That Sticks
csswizardry
13
960
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Large-scale JavaScript Application Architecture
addyosmani
514
110k
Practical Orchestrator
shlominoach
190
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Code Reviewing Like a Champion
maltzj
527
40k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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