Skip to content

Commit

Permalink
fix: add provider to guardduty features (#195)
Browse files Browse the repository at this point in the history
* fix:add provider to guardduty features

* fix:change order following styleguide
  • Loading branch information
marcoschreurs authored Dec 4, 2023
1 parent 2d8adb2 commit 85dbc48
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions guardduty.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,24 @@ resource "aws_guardduty_detector" "audit" {
}

resource "aws_guardduty_organization_configuration_feature" "ebs_malware_protection" {
provider = aws.audit

detector_id = aws_guardduty_detector.audit.id
name = "EBS_MALWARE_PROTECTION"
auto_enable = var.aws_guardduty.ebs_malware_protection_status == true ? "ALL" : "NONE"
}

resource "aws_guardduty_organization_configuration_feature" "eks_audit_logs" {
provider = aws.audit

detector_id = aws_guardduty_detector.audit.id
name = "EKS_AUDIT_LOGS"
auto_enable = var.aws_guardduty.eks_audit_logs_status == true ? "ALL" : "NONE"
}

resource "aws_guardduty_organization_configuration_feature" "eks_runtime_monitoring" {
provider = aws.audit

detector_id = aws_guardduty_detector.audit.id
name = "EKS_RUNTIME_MONITORING"
auto_enable = var.aws_guardduty.eks_runtime_monitoring_status == true ? "ALL" : "NONE"
Expand All @@ -49,18 +55,24 @@ resource "aws_guardduty_organization_configuration_feature" "eks_runtime_monitor
}

resource "aws_guardduty_organization_configuration_feature" "lambda_network_logs" {
provider = aws.audit

detector_id = aws_guardduty_detector.audit.id
name = "LAMBDA_NETWORK_LOGS"
auto_enable = var.aws_guardduty.lambda_network_logs_status == true ? "ALL" : "NONE"
}

resource "aws_guardduty_organization_configuration_feature" "rds_login_events" {
provider = aws.audit

detector_id = aws_guardduty_detector.audit.id
name = "RDS_LOGIN_EVENTS"
auto_enable = var.aws_guardduty.rds_login_events_status == true ? "ALL" : "NONE"
}

resource "aws_guardduty_organization_configuration_feature" "s3_data_events" {
provider = aws.audit

detector_id = aws_guardduty_detector.audit.id
name = "S3_DATA_EVENTS"
auto_enable = var.aws_guardduty.s3_data_events_status == true ? "ALL" : "NONE"
Expand Down

0 comments on commit 85dbc48

Please sign in to comment.