This template enables an AWS GuardDuty detector with specific data sources including S3 logs and EC2 instance EBS volume scans, while disabling Kubernetes audit logs.

Terraform Template

resource "aws_guardduty_detector" "MyDetector" {

  datasources {

    kubernetes {

      audit_logs {
        enable = false
      }
    }

    malware_protection {

      scan_ec2_instance_with_findings {

        ebs_volumes {
          enable = true
        }
      }
    }

    s3_logs {
      enable = true
    }
  }
  enable = true
}