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
AWSでTerraform超入門
Search
hr0hr57
October 21, 2023
Technology
470
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWSでTerraform超入門
2023/10/26の「めぐろLT大会#8」で発表した資料です。
hr0hr57
October 21, 2023
More Decks by hr0hr57
See All by hr0hr57
AWS Network Firewall Proxyで脱Squid運用⁈
nnydtmg
1
410
WebアプリのObservabilityを実装しようonAWS
nnydtmg
0
69
リソースのテレメトリも管理したい!〜CloudWatch Telemetry管理のご紹介〜
nnydtmg
0
410
宇宙最速のランチRecap LT会(開発者ツール&運用監視編)
nnydtmg
2
530
AWS All Certが伝える 新AWS認定試験取得のコツ (Machine Learning Engineer - Associate)
nnydtmg
1
1.3k
AWS認定試験 DEA受験記
nnydtmg
1
790
インフラ担当者がLambdaの設定値を今一度整理してみた
nnydtmg
0
510
金融系・JTCエンジニアこそコミュニティに行け!
nnydtmg
0
290
Terraform v1.6.0で始めるインフラ単体テスト
nnydtmg
2
1.8k
Other Decks in Technology
See All in Technology
HolmesGPTで始めるSREエージェント入門!プラットフォームの障害調査はAIにお任せ 〜
sanghyuk
0
250
ログラスのマルチプロダクトを 支える認証基盤 〜テナントごとに異なる統制とどう向き合うか〜
dada4386
3
300
AIエージェント時代のPlatform as a Product —— テックリードがPdMとして回す発見・導入・計測 / Platform as a Product in the AI Agent Era
toshi0607
1
550
PQC移行の今 -- IETF からみた現在地
satokan
4
720
BedrockとLambdaで作る リアルタイム進行型推理ゲーム
kawametho
0
140
【ゲームメーカーズスクランブル2026】『Shadowverse: Worlds Beyond』UIとアニメーションで実現する最高のユーザー体験を叶えるプロトタイピング
cygames
PRO
1
710
2026-09-26 Platform Engineering Kaigi 2026 インフラとアプリの境界線と委譲の設計 / Drawing the Infra and App Line
masasuzu
0
540
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
16
120k
行動するAIのためのオントロジー | DevRev — Encraft #26.pdf
dvrv_tknrszk
2
660
SQL Server 2025 最適化されたロック
odashinsuke
0
110
20260930_Gemma4_Hands-on
tsho
0
200
可視化から始めたAI駆動開発_ochi_ver1.01 / AI-Driven Development Starting with Visualization_ver1.01
yayoi_dd
0
110
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Abbi's Birthday
coloredviolet
4
10k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
840
Facilitating Awesome Meetings
lara
57
7.2k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
58k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Docker and Python
trallard
47
4.2k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Transcript
AWSでTerraform超入門 2023/10/26(木) めぐろLT会#8 1
自己紹介 • ryosaan (@hr0hr57) • 某金融系SIerでインフラ設計・構築を担当 • 業務ではAWSを利用中 • 所属コミュニティ
◦ AWS Community Builder(Cloud Operations) ◦ Ops-JAWS運営 ◦ CNDT2023運営 ◦ この他クラウド系コミュニティによく出没 • 2022-23 APN ALL AWS Certifications Engineers 2
お断り • 2023/10/1にステマ規制が施行されたため、念の為製品情報が強く出ているページ には下記のアイコンを表示しています。 • 私自身は一切HashiCorp社との繋がりはございません。 PR 3
Terraformとは • HashiCorp社が開発 • マルチクラウドに対応したIaC (Infrastructure as Code) ツール ◦
AWS CDK , AWS CloudFormation , Pulumi , Bicep , Ansible , etc.. • 作成したいリソースをコードとして管理し、数コマンドで環境が構築できる • 宣言型モデルで作りたい環境のあるべき姿を定義 ◦ cf. 命令実行モデル:作成する手順をコード化 • 独自のHCL言語でコードを記述する • 内部的にはGo言語で構成され、内部で各プロバイダのSDKを呼び出すことでリソー スを作成する PR 4
必要な準備 • 実行環境 ◦ コードを実行する環境にインストール https://developer.hashicorp.com/terraform/downloads • 実行コード ◦ .tfファイル
構成情報、プロバイダー情報、変数などを定義する ◦ .tfstateファイル(実行時に自動的に作成される) 作成されたリソース情報が定義されている ◦ (オプション).tfvarsファイル 変数を外出しして管理する ◦ (オプション).outputファイル 他リソースで参照するための値を定義する 5
実際のコード例 • 構成 6
実際のコード例 • 各リソース毎のresourceブロック • 各パラメータはリファレンスを参照 (Terraform AWS Provider) • コメントの記載も可能
• モジュール化やWorkspaceの利用 など、チーム開発にも適応できる • 最短3コマンドで作成できる ◦ terraform init (初回のみ) ◦ terraform plan ◦ terraform apply https://github.com/nnydtmg/terraform-ec2-sample 7
みなさんもぜひIaCに入門してみてください! ご清聴ありがとうございました! 8