prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  CKV_AWS_299 Fails for Values That Can't be Set
  **Describe the issue**
  Failing on - Check: CKV_AWS_299: "Ensure DMS S3 defines in-transit encryption"
  
  When the endpoint of a DMS Migration Task has a Endpoint that is S3, there is no option in AWS to specify ssl_mode. AWS does not have an ssl_mode for DMS Endpoints of type S3. Setting this value on extra connections does nothing. Also, setting this in Terraform does nothing. I may be crazy, but I think DMS transfers to S3 uses SSL by default.
  
  **Examples**
  ```
  
  from __future__ import annotations
  
  from typing import Any
  
  from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
  from checkov.common.models.enums import CheckCategories
  
  
  class DMSS3DefinesIntransitEncryption(BaseResourceValueCheck):
      def __init__(self) -> None:
          name = "Ensure DMS S3 defines in-transit encryption"
          id = "CKV_AWS_299"
          supported_resources = ("aws_dms_s3_endpoint",)
          categories = (CheckCategories.ENCRYPTION,)
          super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  
      def get_inspected_key(self) -> str:
          return 'ssl_mode'
  
      def get_expected_values(self) -> list[Any]:
          return ["require", "verify-ca", "verify-full"]
  
  
  check = DMSS3DefinesIntransitEncryption()
  
  ```
  
  **Version (please complete the following information):**
   - Checkov Version 2.3.343
  
  **Additional context**
  
  This is property does nothing in terraform when the aws_dme_enpoint is s3 and I file and issue over there, however, it was closed with no fix.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py`
  Content:
  ```
  1 from __future__ import annotations
  2 
  3 from typing import Any
  4 
  5 from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
  6 from checkov.common.models.enums import CheckCategories
  7 
  8 
  9 class DMSS3DefinesIntransitEncryption(BaseResourceValueCheck):
  10     def __init__(self) -> None:
  11         name = "Ensure DMS S3 defines in-transit encryption"
  12         id = "CKV_AWS_299"
  13         supported_resources = ("aws_dms_s3_endpoint",)
  14         categories = (CheckCategories.ENCRYPTION,)
  15         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  16 
  17     def get_inspected_key(self) -> str:
  18         return 'ssl_mode'
  19 
  20     def get_expected_values(self) -> list[Any]:
  21         return ["require", "verify-ca", "verify-full"]
  22 
  23 
  24 check = DMSS3DefinesIntransitEncryption()
  25
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py b/checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py
  deleted file mode 100644
  --- a/checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py
  +++ /dev/null
  @@ -1,24 +0,0 @@
  -from __future__ import annotations
  -
  -from typing import Any
  -
  -from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
  -from checkov.common.models.enums import CheckCategories
  -
  -
  -class DMSS3DefinesIntransitEncryption(BaseResourceValueCheck):
  -    def __init__(self) -> None:
  -        name = "Ensure DMS S3 defines in-transit encryption"
  -        id = "CKV_AWS_299"
  -        supported_resources = ("aws_dms_s3_endpoint",)
  -        categories = (CheckCategories.ENCRYPTION,)
  -        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  -
  -    def get_inspected_key(self) -> str:
  -        return 'ssl_mode'
  -
  -    def get_expected_values(self) -> list[Any]:
  -        return ["require", "verify-ca", "verify-full"]
  -
  -
  -check = DMSS3DefinesIntransitEncryption()
  
verification_info: {"golden_diff": "diff --git a/checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py b/checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py\ndeleted file mode 100644\n--- a/checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py\n+++ /dev/null\n@@ -1,24 +0,0 @@\n-from __future__ import annotations\n-\n-from typing import Any\n-\n-from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n-from checkov.common.models.enums import CheckCategories\n-\n-\n-class DMSS3DefinesIntransitEncryption(BaseResourceValueCheck):\n-    def __init__(self) -> None:\n-        name = \"Ensure DMS S3 defines in-transit encryption\"\n-        id = \"CKV_AWS_299\"\n-        supported_resources = (\"aws_dms_s3_endpoint\",)\n-        categories = (CheckCategories.ENCRYPTION,)\n-        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n-\n-    def get_inspected_key(self) -> str:\n-        return 'ssl_mode'\n-\n-    def get_expected_values(self) -> list[Any]:\n-        return [\"require\", \"verify-ca\", \"verify-full\"]\n-\n-\n-check = DMSS3DefinesIntransitEncryption()\n", "issue": "CKV_AWS_299 Fails for Values That Can't be Set\n**Describe the issue**\r\nFailing on - Check: CKV_AWS_299: \"Ensure DMS S3 defines in-transit encryption\"\r\n\r\nWhen the endpoint of a DMS Migration Task has a Endpoint that is S3, there is no option in AWS to specify ssl_mode. AWS does not have an ssl_mode for DMS Endpoints of type S3. Setting this value on extra connections does nothing. Also, setting this in Terraform does nothing. I may be crazy, but I think DMS transfers to S3 uses SSL by default.\r\n\r\n**Examples**\r\n```\r\n\r\nfrom __future__ import annotations\r\n\r\nfrom typing import Any\r\n\r\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\r\nfrom checkov.common.models.enums import CheckCategories\r\n\r\n\r\nclass DMSS3DefinesIntransitEncryption(BaseResourceValueCheck):\r\n    def __init__(self) -> None:\r\n        name = \"Ensure DMS S3 defines in-transit encryption\"\r\n        id = \"CKV_AWS_299\"\r\n        supported_resources = (\"aws_dms_s3_endpoint\",)\r\n        categories = (CheckCategories.ENCRYPTION,)\r\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\r\n\r\n    def get_inspected_key(self) -> str:\r\n        return 'ssl_mode'\r\n\r\n    def get_expected_values(self) -> list[Any]:\r\n        return [\"require\", \"verify-ca\", \"verify-full\"]\r\n\r\n\r\ncheck = DMSS3DefinesIntransitEncryption()\r\n\r\n```\r\n\r\n**Version (please complete the following information):**\r\n - Checkov Version 2.3.343\r\n\r\n**Additional context**\r\n\r\nThis is property does nothing in terraform when the aws_dme_enpoint is s3 and I file and issue over there, however, it was closed with no fix.\n", "before_files": [{"content": "from __future__ import annotations\n\nfrom typing import Any\n\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\nfrom checkov.common.models.enums import CheckCategories\n\n\nclass DMSS3DefinesIntransitEncryption(BaseResourceValueCheck):\n    def __init__(self) -> None:\n        name = \"Ensure DMS S3 defines in-transit encryption\"\n        id = \"CKV_AWS_299\"\n        supported_resources = (\"aws_dms_s3_endpoint\",)\n        categories = (CheckCategories.ENCRYPTION,)\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def get_inspected_key(self) -> str:\n        return 'ssl_mode'\n\n    def get_expected_values(self) -> list[Any]:\n        return [\"require\", \"verify-ca\", \"verify-full\"]\n\n\ncheck = DMSS3DefinesIntransitEncryption()\n", "path": "checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py"}], "after_files": [{"content": null, "path": "checkov/terraform/checks/resource/aws/DMSS3DefinesIntransitEncryption.py"}]}