This template enables an AWS GuardDuty detector and configures the EKS runtime monitoring feature.

Terraform Template

resource "aws_guardduty_detector" "example" {
  enable = true
}

resource "aws_guardduty_detector_feature" "eks_runtime_monitoring" {

  additional_configuration {
    name = "EKS_ADDON_MANAGEMENT"
    status = "ENABLED"
  }
  detector_id = aws_guardduty_detector.example.id
  name = "EKS_RUNTIME_MONITORING"
  status = "ENABLED"
}