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
150
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
74
Web APIs 2019
orlando
0
120
Managing remote teams
orlando
0
60
How to be a Senior Software Engineer
orlando
0
140
Infrastructure as Code with Terraform
orlando
0
280
Concurrencia, Paralelismo y el Event-loop
orlando
0
340
Talking Web Apps
orlando
0
89
Web Launchpad - Chelajs
orlando
0
200
Web Launchpad
orlando
1
310
Other Decks in Programming
See All in Programming
AIエージェントによるテストフレームワーク Arbigent
takahirom
0
270
がんばりすぎないコーディングルール運用術
tsukakei
1
180
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
7
380
バランスを見極めよう!実装の意味を明示するための型定義 TSKaigi 2025 Day2 (5/24)
whatasoda
2
780
eBPFを用いたAIネットワーク監視システム論文の実装 / eBPF Japan Meetup #4
yuukit
3
620
ワイがおすすめする新潟の食 / 20250530phpconf-niigata-eve
kasacchiful
0
230
型付け力を強化するための Hoogle のすゝめ / Boosting Your Type Mastery with Hoogle
guvalif
1
230
TypeScript エンジニアが Android 開発の世界に飛び込んだ話
yuisakamoto
6
960
テスト分析入門/Test Analysis Tutorial
goyoki
11
2.7k
Use Perl as Better Shell Script
karupanerura
0
650
TSConfigからTypeScriptの世界を覗く
planck16
2
1.3k
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
1
160
Featured
See All Featured
Navigating Team Friction
lara
186
15k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Why You Should Never Use an ORM
jnunemaker
PRO
56
9.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.8k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
34k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Building Adaptive Systems
keathley
41
2.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
228
22k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
Making Projects Easy
brettharned
116
6.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 = "
[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