Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Terraform Introduction
Search
Akira Yumiyama
April 07, 2018
Technology
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Terraform Introduction
Akira Yumiyama
April 07, 2018
More Decks by Akira Yumiyama
See All by Akira Yumiyama
GAE/Python2 to Python3 Migration Journey
akiray03
0
2k
オブジェクト指向で考える アプリケーションアーキテクチャ設計 / Object-Oriented Conference 2020
akiray03
6
26k
Case Study of Machine Learning in CrowdWorks
akiray03
0
2.1k
CrowdWorksを支える管理画面 - 管理画面チラ見せ♡ナイト #5
akiray03
0
1.8k
DevSumi2015 19-D-2 IIJ社内におけるアジャイル開発、DevOpsへの取り組み
akiray03
0
490
mruby introduction -- jinbocho.rb #01
akiray03
9
1.2k
Other Decks in Technology
See All in Technology
アクセスキーこわい やめかたと漏らさない工夫
sassssan68
1
290
データ_AIの事業の勝敗をわけるもの
nek0128
0
380
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
190
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
2
910
データ界隈LT祭 第1回LT登壇
taromatsui_cccmkhd
2
1.4k
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
610
iOSDC Japan 2026 day1 TrackC 10:50
feedtailor
1
160
10分で知る最近のOmarchy
komagata
0
350
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
20260912_スクラムにジェネラリストは必要か
ryugen04
0
420
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
3
3k
30座EKS, 180次升級淬煉的EKS Upgrade Skill 的歷程
eric8230
0
170
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Ethics towards AI in product and experience design
skipperchong
2
380
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
460
30 Presentation Tips
portentint
PRO
1
400
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Prompt Engineering for Job Search
mfonobong
0
450
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Transcript
Terraform超入門 2018/4 @akiray03
Terraformとは何か https://www.terraform.io/ HashiCorpの作るインフラ構成管理ツール
Terrafromは何であって何でないのか • Terraformはインフラリソースをコード管理するツールです • Chefやansibleとは少しレイヤが違います AWS or GCP or Azure
or ... Compute Instance Compute Instance nginx ruby … nginx ruby … Chef or ansible or ..
Terraformは何をしているのか • Terraformはユーザが記述した設定ファイルに従って、APIを呼び出しているだけで す • AWSやGCPのAPI呼び出しのラッパーツール、という見方もできます • Terraformの魅力はどこにあるのでしょうか 設定ファイル (
.tf ) AWS API GCP API
Terraformの魅力(1) インフラの状態を保持する • Terraformは tfstate というJSONファイルにTerraformが操作したリソースの状態を 保存しています • tfstateに記録された状態と、現在のAWSやGCP上のリソースの状態を比較するこ とで、期待した状態との差分を計算し、期待した状態に収束するような操作(追加・
削除・変更)を実現してくれます 設定ファイル ( .tf ) AWS API GCP API tfstate
Terraformの魅力(2) 依存関係を解決してくれる • AWSやGCPでCompute Instance を起動するためには、依存するリソースが存在 している必要があります (例: ネットワークや、セキュリティ設定、等) •
起動したインスタンスのPublic IPに対してDNSレコードを設定する、という状況でも 依存関係が発生します • Terraformはこのようなリソース間の依存関係を解決し、適切な順番でAPI呼び出し を行ってくれます
Terraformの魅力(2) 依存関係を解決してくれる resource "aws_instance" "web" { ami_id = "ami-123456" instance_type
= "t2.micro" } resource "aws_route53_record" "www" { zone_id = "Z12345678" name = "abc.example.com" type = "A" ttl = "300" records = ["${aws_instance.web.public_ip}"] }
tfstateの管理 • Terraformの認識しているリソース状態はtfstateというJSONファイルに保存される • このファイルは、ローカルに配置することも、Amazon S3やGoogle Cloud Storage に保存することもできる ◦
S3やGCSに保存することで、複数人・複数端末での tfstateの共有がやりやすくなる ◦ が、同時に操作すると混乱状態になるので注意 • tfstate の単位で plan / apply することになるので、適切なサイズに分割することが 重要