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
110
Web APIs 2019
orlando
0
150
Managing remote teams
orlando
0
78
How to be a Senior Software Engineer
orlando
0
150
Infrastructure as Code with Terraform
orlando
0
320
Concurrencia, Paralelismo y el Event-loop
orlando
0
390
Talking Web Apps
orlando
0
130
Web Launchpad - Chelajs
orlando
0
250
Web Launchpad
orlando
1
350
Other Decks in Programming
See All in Programming
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
170
PHPで TLSのプロトコルを実装してみる
higaki_program
0
410
モダンOBSプラグイン開発
umireon
0
170
Claude Code Skill入門
mayahoney
0
420
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.1k
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
1.2k
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
240
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
130
飯MCP
yusukebe
0
230
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
160
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
310
Featured
See All Featured
A designer walks into a library…
pauljervisheath
210
24k
Utilizing Notion as your number one productivity tool
mfonobong
4
270
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Chasing Engaging Ingredients in Design
codingconduct
0
150
Game over? The fight for quality and originality in the time of robots
wayneb77
1
140
First, design no harm
axbom
PRO
2
1.1k
How GitHub (no longer) Works
holman
316
150k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
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