prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  CKV_AWS_325 check might not be accurate for PostgreSQL RDS instances
  **Describe the issue**
  The CKV_AWS_325 check expects the 'audit' log type to be enabled for RDS Cluster audit logging. However, this log type may not be applicable for PostgreSQL RDS instances, which use the 'postgresql' log type instead.
  
  **Examples**
  For a PostgreSQL RDS instance with the following Terraform configuration:
  
  **main.tf**
  
  ```
  resource "aws_rds_cluster" "main" {
    # ... other configurations ...
    enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports
    # ... other configurations ...
  }
  ```
  
  **variables.tf**
  
  ```
  variable "enabled_cloudwatch_logs_exports" {
    default = [
      "postgresql"
    ]
  }
  ```
  
  The CKV_AWS_325 check fails, even though the 'postgresql' log type is enabled for the RDS instance.
  
  **Expected outcome**
  The CKV_AWS_325 check should either not be applicable or should pass for PostgreSQL RDS instances with the 'postgresql' log type enabled.
  
  **Version**
  
  **Checkov Version:** Lastest
  
  **Additional context**
  This issue was discovered while analyzing a Terraform configuration for an AWS PostgreSQL RDS instance. The CKV_AWS_325 check might need to be updated to accommodate different log types for different RDS engines.
  
  https://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py
  
  </issue>
  <code>
  [start of checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py]
  1 from __future__ import annotations
  2 
  3 from typing import Any
  4 
  5 from checkov.common.models.enums import CheckCategories, CheckResult
  6 from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
  7 
  8 
  9 class RDSClusterAuditLogging(BaseResourceCheck):
  10     def __init__(self) -> None:
  11         """
  12         NIST.800-53.r5 AC-2(4), NIST.800-53.r5 AC-4(26), NIST.800-53.r5 AC-6(9), NIST.800-53.r5 AU-10,
  13         NIST.800-53.r5 AU-12, NIST.800-53.r5 AU-2, NIST.800-53.r5 AU-3, NIST.800-53.r5 AU-6(3), NIST.800-53.r5 AU-6(4),
  14         NIST.800-53.r5 CA-7, NIST.800-53.r5 SC-7(10), NIST.800-53.r5 SC-7(9), NIST.800-53.r5 SI-3(8),
  15         NIST.800-53.r5 SI-4(20), NIST.800-53.r5 SI-7(8)
  16         Database logging should be enabled
  17         """
  18         name = "Ensure that RDS Cluster audit logging is enabled"
  19         id = "CKV_AWS_325"
  20         supported_resources = ("aws_rds_cluster",)
  21         categories = (CheckCategories.LOGGING,)
  22         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  23 
  24     def scan_resource_conf(self, conf: dict[str, list[Any]]) -> CheckResult:
  25         logs_exports = conf.get("enabled_cloudwatch_logs_exports")
  26         if (
  27             logs_exports
  28             and isinstance(logs_exports, list)
  29             and isinstance(logs_exports[0], list)
  30             and "audit" in logs_exports[0]
  31         ):
  32             return CheckResult.PASSED
  33 
  34         return CheckResult.FAILED
  35 
  36 
  37 check = RDSClusterAuditLogging()
  38
  [end of checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py b/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py
  --- a/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py
  +++ b/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py
  @@ -5,6 +5,12 @@
   from checkov.common.models.enums import CheckCategories, CheckResult
   from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
   
  +SUPPORTED_ENGINES = {
  +    "aurora",
  +    "aurora-mysql",
  +    "mysql"
  +}
  +
   
   class RDSClusterAuditLogging(BaseResourceCheck):
       def __init__(self) -> None:
  @@ -15,13 +21,18 @@
           NIST.800-53.r5 SI-4(20), NIST.800-53.r5 SI-7(8)
           Database logging should be enabled
           """
  -        name = "Ensure that RDS Cluster audit logging is enabled"
  +        name = "Ensure that RDS Cluster audit logging is enabled for MySQL engine"
           id = "CKV_AWS_325"
           supported_resources = ("aws_rds_cluster",)
           categories = (CheckCategories.LOGGING,)
           super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
   
       def scan_resource_conf(self, conf: dict[str, list[Any]]) -> CheckResult:
  +        engine = conf.get("engine")
  +        if engine and isinstance(engine, list) and engine[0] not in SUPPORTED_ENGINES:
  +            # only MySQL cluster support easy audit logging export
  +            return CheckResult.UNKNOWN
  +
           logs_exports = conf.get("enabled_cloudwatch_logs_exports")
           if (
               logs_exports
  
verification_info: {"golden_diff": "diff --git a/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py b/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py\n--- a/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py\n+++ b/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py\n@@ -5,6 +5,12 @@\n from checkov.common.models.enums import CheckCategories, CheckResult\n from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n \n+SUPPORTED_ENGINES = {\n+    \"aurora\",\n+    \"aurora-mysql\",\n+    \"mysql\"\n+}\n+\n \n class RDSClusterAuditLogging(BaseResourceCheck):\n     def __init__(self) -> None:\n@@ -15,13 +21,18 @@\n         NIST.800-53.r5 SI-4(20), NIST.800-53.r5 SI-7(8)\n         Database logging should be enabled\n         \"\"\"\n-        name = \"Ensure that RDS Cluster audit logging is enabled\"\n+        name = \"Ensure that RDS Cluster audit logging is enabled for MySQL engine\"\n         id = \"CKV_AWS_325\"\n         supported_resources = (\"aws_rds_cluster\",)\n         categories = (CheckCategories.LOGGING,)\n         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n \n     def scan_resource_conf(self, conf: dict[str, list[Any]]) -> CheckResult:\n+        engine = conf.get(\"engine\")\n+        if engine and isinstance(engine, list) and engine[0] not in SUPPORTED_ENGINES:\n+            # only MySQL cluster support easy audit logging export\n+            return CheckResult.UNKNOWN\n+\n         logs_exports = conf.get(\"enabled_cloudwatch_logs_exports\")\n         if (\n             logs_exports\n", "issue": "CKV_AWS_325 check might not be accurate for PostgreSQL RDS instances\n**Describe the issue**\r\nThe CKV_AWS_325 check expects the 'audit' log type to be enabled for RDS Cluster audit logging. However, this log type may not be applicable for PostgreSQL RDS instances, which use the 'postgresql' log type instead.\r\n\r\n**Examples**\r\nFor a PostgreSQL RDS instance with the following Terraform configuration:\r\n\r\n**main.tf**\r\n\r\n```\r\nresource \"aws_rds_cluster\" \"main\" {\r\n  # ... other configurations ...\r\n  enabled_cloudwatch_logs_exports = var.enabled_cloudwatch_logs_exports\r\n  # ... other configurations ...\r\n}\r\n```\r\n\r\n**variables.tf**\r\n\r\n```\r\nvariable \"enabled_cloudwatch_logs_exports\" {\r\n  default = [\r\n    \"postgresql\"\r\n  ]\r\n}\r\n```\r\n\r\nThe CKV_AWS_325 check fails, even though the 'postgresql' log type is enabled for the RDS instance.\r\n\r\n**Expected outcome**\r\nThe CKV_AWS_325 check should either not be applicable or should pass for PostgreSQL RDS instances with the 'postgresql' log type enabled.\r\n\r\n**Version**\r\n\r\n**Checkov Version:** Lastest\r\n\r\n**Additional context**\r\nThis issue was discovered while analyzing a Terraform configuration for an AWS PostgreSQL RDS instance. The CKV_AWS_325 check might need to be updated to accommodate different log types for different RDS engines.\r\n\r\nhttps://github.com/bridgecrewio/checkov/blob/main/checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom typing import Any\n\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n\n\nclass RDSClusterAuditLogging(BaseResourceCheck):\n    def __init__(self) -> None:\n        \"\"\"\n        NIST.800-53.r5 AC-2(4), NIST.800-53.r5 AC-4(26), NIST.800-53.r5 AC-6(9), NIST.800-53.r5 AU-10,\n        NIST.800-53.r5 AU-12, NIST.800-53.r5 AU-2, NIST.800-53.r5 AU-3, NIST.800-53.r5 AU-6(3), NIST.800-53.r5 AU-6(4),\n        NIST.800-53.r5 CA-7, NIST.800-53.r5 SC-7(10), NIST.800-53.r5 SC-7(9), NIST.800-53.r5 SI-3(8),\n        NIST.800-53.r5 SI-4(20), NIST.800-53.r5 SI-7(8)\n        Database logging should be enabled\n        \"\"\"\n        name = \"Ensure that RDS Cluster audit logging is enabled\"\n        id = \"CKV_AWS_325\"\n        supported_resources = (\"aws_rds_cluster\",)\n        categories = (CheckCategories.LOGGING,)\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf: dict[str, list[Any]]) -> CheckResult:\n        logs_exports = conf.get(\"enabled_cloudwatch_logs_exports\")\n        if (\n            logs_exports\n            and isinstance(logs_exports, list)\n            and isinstance(logs_exports[0], list)\n            and \"audit\" in logs_exports[0]\n        ):\n            return CheckResult.PASSED\n\n        return CheckResult.FAILED\n\n\ncheck = RDSClusterAuditLogging()\n", "path": "checkov/terraform/checks/resource/aws/RDSClusterAuditLogging.py"}]}