Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Terraform Plan/Apply結果の自動通知
Search
Kohei Yamamoto
June 10, 2022
Programming
0
850
Terraform Plan/Apply結果の自動通知
Kohei Yamamoto
June 10, 2022
Tweet
Share
Other Decks in Programming
See All in Programming
Vibe codingでおすすめの言語と開発手法
uyuki234
0
130
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
190
チームをチームにするEM
hitode909
0
400
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
160
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
4k
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
130
ゲームの物理 剛体編
fadis
0
380
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.1k
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
26k
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
130
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.4k
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
160
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
0
130
Optimizing for Happiness
mojombo
379
70k
The untapped power of vector embeddings
frankvandijk
1
1.5k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
82
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
73
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
How to Talk to Developers About Accessibility
jct
1
86
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
0
97
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
280
Abbi's Birthday
coloredviolet
0
3.9k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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へ再訪する必要がな くなった。