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
63
Web APIs 2019
orlando
0
97
Managing remote teams
orlando
0
55
How to be a Senior Software Engineer
orlando
0
120
Infrastructure as Code with Terraform
orlando
0
260
Concurrencia, Paralelismo y el Event-loop
orlando
0
310
Talking Web Apps
orlando
0
67
Web Launchpad - Chelajs
orlando
0
180
Web Launchpad
orlando
1
290
Other Decks in Programming
See All in Programming
Swiftコードバトル必勝法
toshi0383
0
170
Go1.23で入った errorsパッケージの小さなアプデ
kuro_kurorrr
2
390
What you can do with Ruby on WebAssembly
kateinoigakukun
0
170
Debugging: All you need to know (for simultaneous interpreting)
jmatsu
2
800
いつか使える ObjectSpace / Maybe useful ObjectSpace
euglena1215
2
140
全部見せます! クラシルリワードのSwiftTesting移行プロジェクト
uetyo
0
210
Why Prism?
kddnewton
4
1.7k
あなたのアプリ、ログはでてますか?あるいはログをだしてますか? (Funabashi.dev用 軽量版)
uzulla
2
120
Jakarta EE meets AI
ivargrimstad
1
500
Android開発以外のAndroid開発経験の活かしどころ
konifar
2
1k
LangChainの現在とv0.3にむけて
os1ma
4
920
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
170
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
80
5.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
326
21k
It's Worth the Effort
3n
182
27k
Side Projects
sachag
451
42k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
25
3.9k
The Art of Programming - Codeland 2020
erikaheidi
48
13k
The Power of CSS Pseudo Elements
geoffreycrofte
71
5.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Embracing the Ebb and Flow
colly
83
4.4k
How to name files
jennybc
75
98k
How GitHub Uses GitHub to Build GitHub
holman
472
290k
What the flash - Photography Introduction
edds
67
11k
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