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
320
Talking Web Apps
orlando
0
77
Web Launchpad - Chelajs
orlando
0
190
Web Launchpad
orlando
1
300
Other Decks in Programming
See All in Programming
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
240
AppRouterを用いた大規模サービス開発におけるディレクトリ構成の変遷と問題点
eiganken
1
450
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
390
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
430
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
10
5.2k
shadcn/uiを使ってReactでの開発を加速させよう!
lef237
0
300
2025.01.17_Sansan × DMM.swift
riofujimon
2
560
情報漏洩させないための設計
kubotak
5
1.3k
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
290
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
180
Внедряем бюджетирование, или Как сделать хорошо?
lamodatech
0
940
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
137
6.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Producing Creativity
orderedlist
PRO
343
39k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Faster Mobile Websites
deanohume
305
30k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
The Cult of Friendly URLs
andyhume
78
6.1k
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