prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  feat: add support for terraform AKS role_based_access_control_enabled
  **Describe the issue**
  `CKV_AZURE_5`
  Recently, azurerm [2.99.0](https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v2.99.0) was published, which, in preparation for 3.0, brought some syntax changes, one of which is listed below:
  ***
  "Data Source: `azurerm_kubernetes_cluster` - deprecated the `role_based_access_control` block in favour of `azure_active_directory_role_based_access_control` and `role_based_access_control_enabled` properties (https://github.com/hashicorp/terraform-provider-azurerm/issues/15584)"
  ***
  
  **Examples**
  
  terraform:
  ```hcl
  role_based_access_control_enabled: true
  ```
  This code should pass `CKV_AZURE_5`.
  
  **Version (please complete the following information):**
   - Checkov Version 2.0.970
  
  **Additional context**
  PR that adds the required support: https://github.com/bridgecrewio/checkov/pull/2648
  
  
  
  --- 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/azure/AKSRbacEnabled.py`
  Content:
  ```
  1 from checkov.common.models.enums import CheckCategories
  2 from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
  3 
  4 
  5 class AKSRbacEnabled(BaseResourceValueCheck):
  6     def __init__(self):
  7         name = "Ensure RBAC is enabled on AKS clusters"
  8         id = "CKV_AZURE_5"
  9         supported_resources = ['azurerm_kubernetes_cluster']
  10         categories = [CheckCategories.KUBERNETES]
  11         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  12 
  13     def get_inspected_key(self):
  14         return 'role_based_access_control/[0]/enabled'
  15 
  16 
  17 check = AKSRbacEnabled()
  18
  ```
  --- 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/azure/AKSRbacEnabled.py b/checkov/terraform/checks/resource/azure/AKSRbacEnabled.py
  --- a/checkov/terraform/checks/resource/azure/AKSRbacEnabled.py
  +++ b/checkov/terraform/checks/resource/azure/AKSRbacEnabled.py
  @@ -1,17 +1,32 @@
  -from checkov.common.models.enums import CheckCategories
  -from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
  +import dpath.util
  +from checkov.common.models.enums import CheckCategories, CheckResult
  +from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
   
   
  -class AKSRbacEnabled(BaseResourceValueCheck):
  +class AKSRbacEnabled(BaseResourceCheck):
       def __init__(self):
           name = "Ensure RBAC is enabled on AKS clusters"
           id = "CKV_AZURE_5"
  -        supported_resources = ['azurerm_kubernetes_cluster']
  +        supported_resources = ["azurerm_kubernetes_cluster"]
           categories = [CheckCategories.KUBERNETES]
  -        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  +        super().__init__(
  +            name=name,
  +            id=id,
  +            categories=categories,
  +            supported_resources=supported_resources,
  +        )
   
  -    def get_inspected_key(self):
  -        return 'role_based_access_control/[0]/enabled'
  +    def scan_resource_conf(self, conf):
  +        self.evaluated_keys = [
  +            "role_based_access_control/[0]/enabled",  # azurerm < 2.99.0
  +            "role_based_access_control_enabled",  # azurerm >= 2.99.0
  +        ]
  +
  +        for key in self.evaluated_keys:
  +            if dpath.search(conf, key) and dpath.get(conf, key)[0]:
  +                return CheckResult.PASSED
  +
  +        return CheckResult.FAILED
   
   
   check = AKSRbacEnabled()
  
verification_info: {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/AKSRbacEnabled.py b/checkov/terraform/checks/resource/azure/AKSRbacEnabled.py\n--- a/checkov/terraform/checks/resource/azure/AKSRbacEnabled.py\n+++ b/checkov/terraform/checks/resource/azure/AKSRbacEnabled.py\n@@ -1,17 +1,32 @@\n-from checkov.common.models.enums import CheckCategories\n-from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n+import dpath.util\n+from checkov.common.models.enums import CheckCategories, CheckResult\n+from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n \n \n-class AKSRbacEnabled(BaseResourceValueCheck):\n+class AKSRbacEnabled(BaseResourceCheck):\n     def __init__(self):\n         name = \"Ensure RBAC is enabled on AKS clusters\"\n         id = \"CKV_AZURE_5\"\n-        supported_resources = ['azurerm_kubernetes_cluster']\n+        supported_resources = [\"azurerm_kubernetes_cluster\"]\n         categories = [CheckCategories.KUBERNETES]\n-        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n+        super().__init__(\n+            name=name,\n+            id=id,\n+            categories=categories,\n+            supported_resources=supported_resources,\n+        )\n \n-    def get_inspected_key(self):\n-        return 'role_based_access_control/[0]/enabled'\n+    def scan_resource_conf(self, conf):\n+        self.evaluated_keys = [\n+            \"role_based_access_control/[0]/enabled\",  # azurerm < 2.99.0\n+            \"role_based_access_control_enabled\",  # azurerm >= 2.99.0\n+        ]\n+\n+        for key in self.evaluated_keys:\n+            if dpath.search(conf, key) and dpath.get(conf, key)[0]:\n+                return CheckResult.PASSED\n+\n+        return CheckResult.FAILED\n \n \n check = AKSRbacEnabled()\n", "issue": "feat: add support for terraform AKS role_based_access_control_enabled\n**Describe the issue**\r\n`CKV_AZURE_5`\r\nRecently, azurerm [2.99.0](https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v2.99.0) was published, which, in preparation for 3.0, brought some syntax changes, one of which is listed below:\r\n***\r\n\"Data Source: `azurerm_kubernetes_cluster` - deprecated the `role_based_access_control` block in favour of `azure_active_directory_role_based_access_control` and `role_based_access_control_enabled` properties (https://github.com/hashicorp/terraform-provider-azurerm/issues/15584)\"\r\n***\r\n\r\n**Examples**\r\n\r\nterraform:\r\n```hcl\r\nrole_based_access_control_enabled: true\r\n```\r\nThis code should pass `CKV_AZURE_5`.\r\n\r\n**Version (please complete the following information):**\r\n - Checkov Version 2.0.970\r\n\r\n**Additional context**\r\nPR that adds the required support: https://github.com/bridgecrewio/checkov/pull/2648\r\n\r\n\n", "before_files": [{"content": "from checkov.common.models.enums import CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n\n\nclass AKSRbacEnabled(BaseResourceValueCheck):\n    def __init__(self):\n        name = \"Ensure RBAC is enabled on AKS clusters\"\n        id = \"CKV_AZURE_5\"\n        supported_resources = ['azurerm_kubernetes_cluster']\n        categories = [CheckCategories.KUBERNETES]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def get_inspected_key(self):\n        return 'role_based_access_control/[0]/enabled'\n\n\ncheck = AKSRbacEnabled()\n", "path": "checkov/terraform/checks/resource/azure/AKSRbacEnabled.py"}], "after_files": [{"content": "import dpath.util\nfrom checkov.common.models.enums import CheckCategories, CheckResult\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\n\n\nclass AKSRbacEnabled(BaseResourceCheck):\n    def __init__(self):\n        name = \"Ensure RBAC is enabled on AKS clusters\"\n        id = \"CKV_AZURE_5\"\n        supported_resources = [\"azurerm_kubernetes_cluster\"]\n        categories = [CheckCategories.KUBERNETES]\n        super().__init__(\n            name=name,\n            id=id,\n            categories=categories,\n            supported_resources=supported_resources,\n        )\n\n    def scan_resource_conf(self, conf):\n        self.evaluated_keys = [\n            \"role_based_access_control/[0]/enabled\",  # azurerm < 2.99.0\n            \"role_based_access_control_enabled\",  # azurerm >= 2.99.0\n        ]\n\n        for key in self.evaluated_keys:\n            if dpath.search(conf, key) and dpath.get(conf, key)[0]:\n                return CheckResult.PASSED\n\n        return CheckResult.FAILED\n\n\ncheck = AKSRbacEnabled()\n", "path": "checkov/terraform/checks/resource/azure/AKSRbacEnabled.py"}]}