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
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.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
XP祭りでしか伝わらないフリップネタ #xpjug
murabayashi
0
120
ソフトウェアラスタライザ
fadis
1
800
Intent as Code
shoppingjaws
4
700
AIとGame Jamで、ゲームを完成させた話
takahirosaeki
0
110
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
信頼性の目標を誰も求めてない
shubox
0
500
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.1k
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
260
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
Press start. Python's next generation.
willingc
PRO
3
330
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
380
Featured
See All Featured
Practical Orchestrator
shlominoach
191
12k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Being A Developer After 40
akosma
91
590k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
970
Utilizing Notion as your number one productivity tool
mfonobong
4
580
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
680
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
RailsConf 2023
tenderlove
30
1.5k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
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