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
Filter What the LLM Reads: RAG Governance with AgentCore Gateway
yakumo
0
110
AWSDirectConnectの構築の進め方を整理してみた
masa_my
1
200
シンプルな設定ファイルで実現する AWS IAM Identity Center の ユーザー管理Terraformフレームワークを公開しました / Simplifying AWS IAM Identity Center User Management: An Open-Source Terraform Framework
yamaguchitk333
0
320
なぜAI時代に技術記事を書くのか?どう書くのか? 〜bunの場合〜
kworkdev
PRO
0
130
freeeにおけるSoftware Factory
freee
PRO
0
530
プロダクトが成長すると、 プロダクトマネージャーの仕事はどう変わるのか - 「まず作る」から「小さく学び、確かめながら進む」へ
sansantech
PRO
1
370
国際カードブランドルール変更に伴うクレジットカード決済取引仕様変更について
k1style
0
240
企画を Software Factory-ready にする——開発が高速になったとき、PdMの仕事はどう変わったか
yachibit
1
270
[re:Invent2026事前勉強会(有志開催)]続きは、ラスベガスの廊下で / continue-in-the-vegas-hallway
sh_fk2
0
260
Kiro Crewで「みのるん式」仕事術やってみた
minorun365
PRO
3
1.1k
AIで選択肢が広がった組織設計の理想と現実
konifar
12
5.3k
Agent × Maestro で始める モバイル E2E 端末準備からテスト実行・結果確認まで
sansantech
PRO
0
210
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
720
Site-Speed That Sticks
csswizardry
13
1.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
350
Code Reviewing Like a Champion
maltzj
529
40k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
GraphQLとの向き合い方2022年版
quramy
50
15k
Designing for humans not robots
tammielis
254
26k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
440
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
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 することになるので、適切なサイズに分割することが 重要