prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  False positive for CKV_AZURE_43 when using the "random" provider resources
  **Describe the issue**
  Check ID: CKV_AZURE_43
  When using any of the random_* resources from the [random provider](https://registry.terraform.io/providers/hashicorp/random/latest/docs) check CKV_AZURE_43 fails.
  
  StorageAccountName.py probably needs the VARIABLE_REFS list expanded to include the random_* resources.
  
  **Examples**
  ```
  resource "random_string" "random" {
    length  = 4
    number  = true
    lower   = false
    special = false
    upper   = false
  }
  
  resource "azurerm_storage_account" "vmstorageaccount" {
    name                      = "storage${random_string.random}"
    ....
  }
  ```
  
  **Version:**
   - Checkov Version 2.0.113
  
  --- 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/StorageAccountName.py`
  Content:
  ```
  1 import re
  2 from typing import List, Dict, Any
  3 
  4 from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
  5 from checkov.common.models.enums import CheckResult, CheckCategories
  6 
  7 STO_NAME_REGEX = re.compile(r"^[a-z0-9]{3,24}$")
  8 VARIABLE_REFS = ("local.", "module.", "var.")
  9 
  10 
  11 class StorageAccountName(BaseResourceCheck):
  12     def __init__(self) -> None:
  13         name = "Ensure Storage Accounts adhere to the naming rules"
  14         id = "CKV_AZURE_43"
  15         supported_resources = ["azurerm_storage_account"]
  16         categories = [CheckCategories.CONVENTION]
  17         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
  18 
  19     def scan_resource_conf(self, conf: Dict[str, Any]) -> CheckResult:
  20         """
  21             The Storage Account naming reference:
  22             https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview#naming-storage-accounts
  23         :param conf: azurerm_storage_account configuration
  24         :return: <CheckResult>
  25         """
  26         name = conf.get("name")
  27         if name:
  28             name = str(name[0])
  29             if any(x in name for x in VARIABLE_REFS):
  30                 # in the case we couldn't evaluate the name, just ignore
  31                 return CheckResult.UNKNOWN
  32             if re.findall(STO_NAME_REGEX, str(conf["name"][0])):
  33                 return CheckResult.PASSED
  34 
  35         return CheckResult.FAILED
  36 
  37     def get_evaluated_keys(self) -> List[str]:
  38         return ["name"]
  39 
  40 
  41 check = StorageAccountName()
  42
  ```
  --- 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/StorageAccountName.py b/checkov/terraform/checks/resource/azure/StorageAccountName.py
  --- a/checkov/terraform/checks/resource/azure/StorageAccountName.py
  +++ b/checkov/terraform/checks/resource/azure/StorageAccountName.py
  @@ -5,7 +5,7 @@
   from checkov.common.models.enums import CheckResult, CheckCategories
   
   STO_NAME_REGEX = re.compile(r"^[a-z0-9]{3,24}$")
  -VARIABLE_REFS = ("local.", "module.", "var.")
  +VARIABLE_REFS = ("local.", "module.", "var.", "random_string.", "random_id.", "random_integer.", "random_pet.")
   
   
   class StorageAccountName(BaseResourceCheck):
  
verification_info: {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/StorageAccountName.py b/checkov/terraform/checks/resource/azure/StorageAccountName.py\n--- a/checkov/terraform/checks/resource/azure/StorageAccountName.py\n+++ b/checkov/terraform/checks/resource/azure/StorageAccountName.py\n@@ -5,7 +5,7 @@\n from checkov.common.models.enums import CheckResult, CheckCategories\n \n STO_NAME_REGEX = re.compile(r\"^[a-z0-9]{3,24}$\")\n-VARIABLE_REFS = (\"local.\", \"module.\", \"var.\")\n+VARIABLE_REFS = (\"local.\", \"module.\", \"var.\", \"random_string.\", \"random_id.\", \"random_integer.\", \"random_pet.\")\n \n \n class StorageAccountName(BaseResourceCheck):\n", "issue": "False positive for CKV_AZURE_43 when using the \"random\" provider resources\n**Describe the issue**\r\nCheck ID: CKV_AZURE_43\r\nWhen using any of the random_* resources from the [random provider](https://registry.terraform.io/providers/hashicorp/random/latest/docs) check CKV_AZURE_43 fails.\r\n\r\nStorageAccountName.py probably needs the VARIABLE_REFS list expanded to include the random_* resources.\r\n\r\n**Examples**\r\n```\r\nresource \"random_string\" \"random\" {\r\n  length  = 4\r\n  number  = true\r\n  lower   = false\r\n  special = false\r\n  upper   = false\r\n}\r\n\r\nresource \"azurerm_storage_account\" \"vmstorageaccount\" {\r\n  name                      = \"storage${random_string.random}\"\r\n  ....\r\n}\r\n```\r\n\r\n**Version:**\r\n - Checkov Version 2.0.113\n", "before_files": [{"content": "import re\nfrom typing import List, Dict, Any\n\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\nfrom checkov.common.models.enums import CheckResult, CheckCategories\n\nSTO_NAME_REGEX = re.compile(r\"^[a-z0-9]{3,24}$\")\nVARIABLE_REFS = (\"local.\", \"module.\", \"var.\")\n\n\nclass StorageAccountName(BaseResourceCheck):\n    def __init__(self) -> None:\n        name = \"Ensure Storage Accounts adhere to the naming rules\"\n        id = \"CKV_AZURE_43\"\n        supported_resources = [\"azurerm_storage_account\"]\n        categories = [CheckCategories.CONVENTION]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf: Dict[str, Any]) -> CheckResult:\n        \"\"\"\n            The Storage Account naming reference:\n            https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview#naming-storage-accounts\n        :param conf: azurerm_storage_account configuration\n        :return: <CheckResult>\n        \"\"\"\n        name = conf.get(\"name\")\n        if name:\n            name = str(name[0])\n            if any(x in name for x in VARIABLE_REFS):\n                # in the case we couldn't evaluate the name, just ignore\n                return CheckResult.UNKNOWN\n            if re.findall(STO_NAME_REGEX, str(conf[\"name\"][0])):\n                return CheckResult.PASSED\n\n        return CheckResult.FAILED\n\n    def get_evaluated_keys(self) -> List[str]:\n        return [\"name\"]\n\n\ncheck = StorageAccountName()\n", "path": "checkov/terraform/checks/resource/azure/StorageAccountName.py"}], "after_files": [{"content": "import re\nfrom typing import List, Dict, Any\n\nfrom checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck\nfrom checkov.common.models.enums import CheckResult, CheckCategories\n\nSTO_NAME_REGEX = re.compile(r\"^[a-z0-9]{3,24}$\")\nVARIABLE_REFS = (\"local.\", \"module.\", \"var.\", \"random_string.\", \"random_id.\", \"random_integer.\", \"random_pet.\")\n\n\nclass StorageAccountName(BaseResourceCheck):\n    def __init__(self) -> None:\n        name = \"Ensure Storage Accounts adhere to the naming rules\"\n        id = \"CKV_AZURE_43\"\n        supported_resources = [\"azurerm_storage_account\"]\n        categories = [CheckCategories.CONVENTION]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)\n\n    def scan_resource_conf(self, conf: Dict[str, Any]) -> CheckResult:\n        \"\"\"\n            The Storage Account naming reference:\n            https://docs.microsoft.com/en-us/azure/storage/common/storage-account-overview#naming-storage-accounts\n        :param conf: azurerm_storage_account configuration\n        :return: <CheckResult>\n        \"\"\"\n        name = conf.get(\"name\")\n        if name:\n            name = str(name[0])\n            if any(x in name for x in VARIABLE_REFS):\n                # in the case we couldn't evaluate the name, just ignore\n                return CheckResult.UNKNOWN\n            if re.findall(STO_NAME_REGEX, str(conf[\"name\"][0])):\n                return CheckResult.PASSED\n\n        return CheckResult.FAILED\n\n    def get_evaluated_keys(self) -> List[str]:\n        return [\"name\"]\n\n\ncheck = StorageAccountName()\n", "path": "checkov/terraform/checks/resource/azure/StorageAccountName.py"}]}