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
Datadogの設定をTerraformで書いてGit管理した話
Search
YouYou
November 02, 2022
Programming
900
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Datadogの設定をTerraformで書いてGit管理した話
YouYou
November 02, 2022
More Decks by YouYou
See All by YouYou
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
320
今インフラ技術をイチから学び直すなら
yuhta28
1
320
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
3
700
Datadog外形監視基盤をEC2から ECSへ移行してみた
yuhta28
0
1.9k
アウトプット頑張ったら企業からLT登壇の依頼がきた話
yuhta28
1
1.9k
小さなことから始めるAWSコスト最適入門
yuhta28
1
1.5k
Datadogのコストも監視しよう
yuhta28
1
1.1k
Rcloneを使った定期的なストレージ同期
yuhta28
0
880
Pulumiを触ってみよう
yuhta28
1
2.8k
Other Decks in Programming
See All in Programming
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2k
FreeBSDでZabbixを動かす
kenkino
0
340
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
370
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
450
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.4k
Webの地図
yosuke_furukawa
PRO
6
5k
wkhtmltopdfの次どうするか問題2026
willnet
2
1.8k
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
190
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Verilogで学ぶCPU自作入門.pdf
uyuki234
7
3.8k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
430
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
410
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
520
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
How GitHub (no longer) Works
holman
316
150k
Practical Orchestrator
shlominoach
192
12k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Facilitating Awesome Meetings
lara
57
7.2k
Speed Design
sergeychernyshev
33
2.1k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
560
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
290
The SEO Collaboration Effect
kristinabergwall1
1
580
Transcript
Datadogの設定をTerraformで 書いてGit管理した話 1
Name:ユータ Occupation:SRE Twitter:@Y0u281 (オーでなくゼロです) ブログ:https://zenn.dev/yuta28 自己紹介 Twitter 2
目次 • 背景 • Datadog ◦ Terraform ◦ GitHub Actions
• よかったこと • まとめ • 宣伝 3
背景 • 今まで ◦ メトリクス:Mackerel ◦ ログ :OpenSearch OpenSearchに移行した経緯はこちらをご覧ください CloudWatch LogsからOpenSearchへログ集約を移行した
- CUEBiC TEC BLOG (hatenablog.com) 4
背景 • 監視から可観測 5
Datadog やりたいこと • SLO作成 • 監視設定をコード管理 6
Terraform • 公式でDatadogモジュールを提供 • モニタリング、SLOの設定ができる • ダッシュボード作成もできるが… 7
GitHub Actions 8
GitHub Actions Terraform用のGitHub Actionsワークフロー 9 - name: Terraform Format run:
terraform fmt -check continue-on-error: true - name: Terraform Validate run: terraform validate -no-color - name: Terraform Plan if: github.event_name == 'pull_request' run: terraform plan -no-color -input=false - name: Terraform Apply if: github.ref == 'refs/heads/main' && github.event_name == 'push' run: terraform apply -auto-approve -input=false env: #Datadog APP key & API key TF_VAR_datadog_api_key: ${{ secrets.DATADOG_API_KEY }} TF_VAR_datadog_app_key: ${{ secrets.DATADOG_APP_KEY }} # OIDC certificated Terraform - name: Configure AWS uses: aws-actions/configure-aws-credentials@v1 with: role-to-assume: ${{ secrets.AWS_ROLE_ARN }} aws-region: ap-northeast-1 ↗
GitHub Actions 10 PRしてPlanがうまくいくか確認 mainにマージしたら自動 Apply
Datadog 11
Datadog ログをOpenSearchからDatadogへ集約 FluentdのプラグインにDatadog対応 12
よかったこと • ぐちゃぐちゃだったモニタリング設定がIaCできれいに整えられた • GitHub Actionsで楽々CI/CD • SLOの設定ができた 13
まとめ 14 • モニタリングもIaC • モニタリングも GitHub Actionsで自動化
ありがとうございました 弊社のテックブログもご覧ください↓ 15