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 Plan/Apply結果の自動通知
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kohei Yamamoto
June 10, 2022
Programming
910
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Terraform Plan/Apply結果の自動通知
Kohei Yamamoto
June 10, 2022
Other Decks in Programming
See All in Programming
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
430
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
150
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
190
アクセシビリティから考える情報設計
high_g_engineer
0
430
Workers Cache を知る
syumai
0
310
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
270
Heart of Swift Concurrency
koher
0
1.1k
カツオ、ご期待ください
suneo3476
0
120
iOSDC Japan 2026 - Swiftで作って学ぼう!データベース自作入門
kaseken
2
400
SREの越境 / SRE Collaboration
y0hgi
2
290
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
Leo the Paperboy
mayatellez
10
2.3k
How STYLIGHT went responsive
nonsquared
100
6.3k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
エンジニアに許された特別な時間の終わり
watany
109
250k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Odyssey Design
rkendrick25
PRO
2
840
KATA
mclloyd
PRO
35
16k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Transcript
Terraform Plan/Apply結果の 自動通知 2022-06-08
自己紹介 山本 晃平 (Kohei Yamamoto) • Web接客プラットフォームを提供する株式会社Sprocketのバックエンドエンジニア • 言語: Go,
Scala, Python, Terraform • インフラ、ミドルウェア: Kubernetes, BigQuery, Dataflow, Apache Kafka • バックエンド技術を広く浅く学んでいます。 • 趣味: 合気道 • Twitter: @yamamocket
トピック • Terraformとは何か • Terraform Plan/Apply結果をどう通知しているか • 結果通知を導入にあたった経緯 • 通知の実現方法の詳細
Terraformとは何か • インフラリソースをコードで管理するIaCを実現するツール • Planコマンド: インフラの変更差分を表示 • Applyコマンド: インフラの変更差分を適用 •
CodeBuildを利用してTerraform Plan/ApplyをCI/CDに組み込んで いる
Terraform Plan結果の通知 • GitHubのコメントとしてPlan結果を投稿
Terraform Apply結果の通知 • Terraform Applyが成功したかどうかをSlackに通知
結果通知を導入に当たった経緯 結果通知がないとき
結果通知を導入に当たった経緯 結果通知がないとき つら い! つら い!
結果通知を導入に当たった経緯 結果通知があるとき
Plan通知の詳細 • tfnotifyというOSSツールを使用 • GitHubへのコメントだけでなく、Slackへの投稿なども可能 • 使い方 ◦ terraform plan
| tfnotify plan • 投稿のテンプレートは設定ファイルから指定可能
Apply通知の詳細 • EventBridgeとLambdaで実装 • CodeBuildの実行結果イベントにより、Lambdaを発火し、Slackの Webhook URLへポスト
まとめ・所感 • Terraform Plan/Applyをどのように通知しているかを紹介 • 特にPlanをGitHubコメントとして投稿することでTerraform開発体験 が飛躍的に良くなった。 ◦ 今までAWSコンソールへいちいちログインするのが煩わしかっ た。
• Applyの通知により、PRをマージした後GitHubへ再訪する必要がな くなった。