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
140
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
67
Web APIs 2019
orlando
0
110
Managing remote teams
orlando
0
58
How to be a Senior Software Engineer
orlando
0
120
Infrastructure as Code with Terraform
orlando
0
270
Concurrencia, Paralelismo y el Event-loop
orlando
0
330
Talking Web Apps
orlando
0
83
Web Launchpad - Chelajs
orlando
0
190
Web Launchpad
orlando
1
300
Other Decks in Programming
See All in Programming
Webフレームワークとともに利用するWeb components / JSConf.jp おかわり
spring_raining
1
130
Drawing Heighway’s Dragon- Recursive Function Rewrite- From Imperative Style in Pascal 64 To Functional Style in Scala 3
philipschwarz
PRO
0
150
TCAを用いたAmebaのリアーキテクチャ
dazy
0
220
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.2k
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
5
1.1k
「個人開発マネタイズ大全」が教えてくれたこと
bani24884
1
290
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
推しメソッドsource_locationのしくみを探る - はじめてRubyのコードを読んでみた
nobu09
2
360
楽しく向き合う例外対応
okutsu
0
730
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
260
たのしいSocketのしくみ / Socket Under a Microscope
coe401_
8
1.4k
もう僕は OpenAPI を書きたくない
sgash708
6
1.9k
Featured
See All Featured
For a Future-Friendly Web
brad_frost
176
9.6k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
How to train your dragon (web standard)
notwaldorf
91
5.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
46
2.4k
Adopting Sorbet at Scale
ufuk
75
9.2k
Designing for Performance
lara
605
68k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.2k
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 = "orlando@orlandodelaguila.com" 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 = “orlando@orlandodelaguila.com" 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