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
2.1k
オブジェクト指向で考える アプリケーションアーキテクチャ設計 / 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.3k
Other Decks in Technology
See All in Technology
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
150
Claude Code本は、どのように執筆チームで書かれたか
oikon48
1
360
SREでアラート疲れを 解決しよう!
kairim0
1
220
ai_cording_with_k8s_knowledge.pdf
mochizuki875
1
330
go-sqletch
moznion
0
130
12 個 Tool と、 4,096 Token
hlum
0
110
全PRの83%が AIレビューだけでマージできるようになった開発組織は その後どうなったか @2026/10
athug
0
140
プロダクト価値を、 チームが使える判断軸に変える
vivion
0
140
二歩目のフロントエンド・ウェブアクセシビリティ
camiha
2
290
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
0
1.5k
味覇で作るパスタが美味い - 20261001_yabaubuki.dev
livesense
PRO
0
120
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
370
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
142
7.7k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
920
Making the Leap to Tech Lead
cromwellryan
135
10k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Ruling the World: When Life Gets Gamed
codingconduct
0
390
Side Projects
sachag
456
43k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
570
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
4 Signs Your Business is Dying
shpigford
187
23k
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 することになるので、適切なサイズに分割することが 重要