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
130
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
63
Web APIs 2019
orlando
0
93
Managing remote teams
orlando
0
55
How to be a Senior Software Engineer
orlando
0
110
Infrastructure as Code with Terraform
orlando
0
260
Concurrencia, Paralelismo y el Event-loop
orlando
0
300
Talking Web Apps
orlando
0
63
Web Launchpad - Chelajs
orlando
0
170
Web Launchpad
orlando
1
280
Other Decks in Programming
See All in Programming
「2024年版 Kotlin サーバーサイドプログラミング実践開発」の補講 〜O/Rマッパー編〜
n_takehata
2
260
Clean Architecture by TypeScript & NestJS
ryounasso
0
150
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Berlin
prof18
0
110
Activities at Cairo Library
cairolibrary720
0
1.2k
なぜ宣言的 UI は壊れにくいのか / Why declarative UI is less fragile
uenitty
29
13k
入社1ヶ月でここまでやった!Findy Toolsインフラ支援の最適化
rvirus0817
6
1.4k
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
I/O Extended Android in Korea 2024 ~ Whats new in Android development tools
pluu
0
250
【Go言語】golangci-lintの使い方
tomo1227
0
280
ぼっちを避けて楽しむためのアノテコノテ / Various Tips and Tricks to Avoid Loneliness and Have Fun
nrslib
3
1.7k
ドメイン駆動設計の実践
masuda220
PRO
19
5.2k
12年前の『型システム入門』翻訳の思い出話
mame
11
1.2k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
127
8.7k
Embracing the Ebb and Flow
colly
81
4.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
353
29k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
26
2.1k
The Invisible Customer
myddelton
117
13k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
245
1.2M
Reflections from 52 weeks, 52 projects
jeffersonlam
346
19k
StorybookのUI Testing Handbookを読んだ
zakiyama
15
4.9k
Design by the Numbers
sachag
277
18k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
662
120k
KATA
mclloyd
20
13k
[RailsConf 2023] Rails as a piece of cake
palkan
35
4.4k
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