Untitled

 avatar
unknown
plain_text
a year ago
619 B
7
Indexable
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
}
Editor is loading...
Leave a Comment