Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
619 B
3
Indexable
Never
resource "aws_iam_policy" "xray_access" {
  name        = "xray-access-policy"
  path        = "/"
  description = "Policy granting access to X-Ray"

  policy = <<EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "xray:BatchGetTraces",
        "xray:GetTraceSummaries",
        "xray:GetServiceGraph",
        "xray:PutTelemetryRecords",
        "xray:PutTraceSegments"
      ],
      "Resource": "*"
    }
  ]
}
EOF
}

resource "aws_iam_role_policy_attachment" "xray_attach" {
  role       = "healthscore-preprod"
  policy_arn = aws_iam_policy.xray_access.arn
}
Leave a Comment