Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Datadogの設定をTerraformで書いてGit管理した話

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.
Avatar for YouYou YouYou
November 02, 2022

 Datadogの設定をTerraformで書いてGit管理した話

Avatar for YouYou

YouYou

November 02, 2022
Tweet

More Decks by YouYou

Other Decks in Programming

Transcript

  1. 目次 • 背景 • Datadog ◦ Terraform ◦ GitHub Actions

    • よかったこと • まとめ • 宣伝 3
  2. 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 ↗