LoginSignup
0
0

【供養】Datadog AWS Integration × Terraform で sts:AssumeRole の罠に詰まった

Last updated at Posted at 2023-11-20

罠ではなく、ただの視野狭窄
謎に詰まったので供養として

前提

Terraform 1.5.4
aws provider 5.2
data dog provider 3.32

結論だけ

datadogのAWSarn:aws:iam::464622532012:rootは日本では利用不可
arn:aws:iam::417141415827:rootを指定すること

なにがおこったか

公式のブログのようにTerraformを構成した

providerは日本なのでそのあたりだけいれて、後は環境変数に入れています

provider.tf

terraform {
  required_version = "1.5.4"
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "5.20.0"
    }
    datadog = {
      source = "DataDog/datadog"
    }
  }
}

provider "aws" {
  region = "ap-northeast-1"
}

provider "datadog" {
  api_url = "https://ap1.datadoghq.com"
}

その他の部分はこれをそのままです

policyに関してはこれをそのまま

そして実行するとでる sts:AssumeRole エラー

解決できない...

右にDATADOG SITEの文字が...
東京なのでAP1にすると、account idがちがう...

東京では
417141415827を使おう

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0