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
170
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
100
Web APIs 2019
orlando
0
150
Managing remote teams
orlando
0
75
How to be a Senior Software Engineer
orlando
0
150
Infrastructure as Code with Terraform
orlando
0
310
Concurrencia, Paralelismo y el Event-loop
orlando
0
380
Talking Web Apps
orlando
0
120
Web Launchpad - Chelajs
orlando
0
250
Web Launchpad
orlando
1
340
Other Decks in Programming
See All in Programming
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
350
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
210
CSC307 Lecture 14
javiergs
PRO
0
450
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
110
CSC307 Lecture 12
javiergs
PRO
0
460
CSC307 Lecture 13
javiergs
PRO
0
310
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
1.6k
TROCCOで実現するkintone+BigQueryによるオペレーション改善
ssxota
0
130
15年目のiOSアプリを1から作り直す技術
teakun
1
600
AIプロダクト時代のQAエンジニアに求められること
imtnd
2
700
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
540
AHC061解説
shun_pi
0
320
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.2k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
BBQ
matthewcrist
89
10k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Designing for Performance
lara
611
70k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
770
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
130
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
130
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