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
Datadogの設定をTerraformで書いてGit管理した話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
310
今インフラ技術をイチから学び直すなら
yuhta28
1
310
AWSに詳しくない人でも始められるコスト最適化ガイド
yuhta28
3
690
Datadog外形監視基盤をEC2から ECSへ移行してみた
yuhta28
0
1.8k
アウトプット頑張ったら企業からLT登壇の依頼がきた話
yuhta28
1
1.9k
小さなことから始めるAWSコスト最適入門
yuhta28
1
1.5k
Datadogのコストも監視しよう
yuhta28
1
1.1k
Rcloneを使った定期的なストレージ同期
yuhta28
0
870
Pulumiを触ってみよう
yuhta28
1
2.8k
Other Decks in Programming
See All in Programming
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
0
360
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
460
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
AIの中の人になってみる
htkym
0
150
Building an Out-of-Order CPU
latte72
0
590
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
620
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
260
業務時間外もAIに働いてもらう話
colorful12
3
9.9k
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
330
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
2
1.5k
自分的「カンファレンスの楽しみ方」
syumai
0
180
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
120
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
450
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
WENDY [Excerpt]
tessaabrams
12
39k
Building Applications with DynamoDB
mza
96
7.2k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
320
Amusing Abliteration
ianozsvald
1
280
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
440
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
340
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
220
It's Worth the Effort
3n
188
29k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
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