prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Azure Function App Slots - Ensure Azure Function App Slots use at least TLS 1.2 
  **Describe the issue**
  It seems that there are no checks that ensure that the following resources to use at least TLS 1.2 :
  
  - azurerm_function_app_slot
  - azurerm_linux_function_app_slot
  - azurerm_windows_function_app_slot
  
  **Examples**
  
  ````hcl
  ````hcl
  resource "azurerm_function_app_slot" "example" {
    name                       = "test-azure-functions_slot"
    location                   = azurerm_resource_group.example.location
    resource_group_name        = azurerm_resource_group.example.name
    app_service_plan_id        = azurerm_app_service_plan.example.id
    function_app_name          = azurerm_function_app.example.name
    storage_account_name       = azurerm_storage_account.example.name
    storage_account_access_key = azurerm_storage_account.example.primary_access_key
  
    site_config {
      min_tls_version = 1.2
    }
  }
  
  resource "azurerm_linux_function_app_slot" "example" {
    name                 = "example-linux-function-app-slot"
    function_app_id      = azurerm_linux_function_app.example.id
    storage_account_name = azurerm_storage_account.example.name
  
    site_config {
      min_tls_version = 1.2
    }
  }
  
  resource "azurerm_windows_function_app" "example" {
    name                 = "example-windows-function-app"
    resource_group_name  = azurerm_resource_group.example.name
    location             = azurerm_resource_group.example.location
    storage_account_name = azurerm_storage_account.example.name
    service_plan_id      = azurerm_service_plan.example.id
  
    site_config {
      min_tls_version = 1.2
    }
  }
  ````
  
  **Version (please complete the following information):**
   - N/A
   
  **Additional context**
  
  N/A
  
  --- 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/FunctionAppMinTLSVersion.py`
  Content:
  ```
  1 from checkov.common.models.enums import CheckResult, CheckCategories
  2 from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
  3 
  4 
  5 class FunctionAppMinTLSVersion(BaseResourceValueCheck):
  6     def __init__(self):
  7         name = "Ensure Function app is using the latest version of TLS encryption"
  8         id = "CKV_AZURE_145"
  9         supported_resources = ['azurerm_function_app']
  10         categories = [CheckCategories.NETWORKING]
  11         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources,
  12                          missing_block_result=CheckResult.PASSED)
  13 
  14     def get_inspected_key(self):
  15         return "site_config/[0]/min_tls_version"
  16 
  17     def get_expected_value(self):
  18         return 1.2
  19 
  20     def get_expected_values(self):
  21         return ["1.2", 1.2]
  22 
  23 
  24 check = FunctionAppMinTLSVersion()
  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/azure/FunctionAppMinTLSVersion.py b/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py
  --- a/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py
  +++ b/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py
  @@ -4,15 +4,27 @@
   
   class FunctionAppMinTLSVersion(BaseResourceValueCheck):
       def __init__(self):
  +        """
  +        The minimum supported TLS version for the function app.
  +        Defaults to 1.2 for new function apps.
  +        field name is:
  +         - min_tls_version in azurerm_function_app, azurerm_function_app_slot.
  +         - minimum_tls_version in newer resources (with linux/windows).
  +        """
           name = "Ensure Function app is using the latest version of TLS encryption"
           id = "CKV_AZURE_145"
  -        supported_resources = ['azurerm_function_app']
  +        supported_resources = ['azurerm_function_app', 'azurerm_linux_function_app', 'azurerm_windows_function_app',
  +                               'azurerm_function_app_slot', 'azurerm_linux_function_app_slot',
  +                               'azurerm_windows_function_app_slot']
           categories = [CheckCategories.NETWORKING]
           super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources,
                            missing_block_result=CheckResult.PASSED)
   
       def get_inspected_key(self):
  -        return "site_config/[0]/min_tls_version"
  +        if self.entity_type in ("azurerm_function_app", "azurerm_function_app_slot"):
  +            return "site_config/[0]/min_tls_version"
  +        else:
  +            return "site_config/[0]/minimum_tls_version"
   
       def get_expected_value(self):
           return 1.2
  
verification_info: {"golden_diff": "diff --git a/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py b/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py\n--- a/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py\n+++ b/checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py\n@@ -4,15 +4,27 @@\n \n class FunctionAppMinTLSVersion(BaseResourceValueCheck):\n     def __init__(self):\n+        \"\"\"\n+        The minimum supported TLS version for the function app.\n+        Defaults to 1.2 for new function apps.\n+        field name is:\n+         - min_tls_version in azurerm_function_app, azurerm_function_app_slot.\n+         - minimum_tls_version in newer resources (with linux/windows).\n+        \"\"\"\n         name = \"Ensure Function app is using the latest version of TLS encryption\"\n         id = \"CKV_AZURE_145\"\n-        supported_resources = ['azurerm_function_app']\n+        supported_resources = ['azurerm_function_app', 'azurerm_linux_function_app', 'azurerm_windows_function_app',\n+                               'azurerm_function_app_slot', 'azurerm_linux_function_app_slot',\n+                               'azurerm_windows_function_app_slot']\n         categories = [CheckCategories.NETWORKING]\n         super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources,\n                          missing_block_result=CheckResult.PASSED)\n \n     def get_inspected_key(self):\n-        return \"site_config/[0]/min_tls_version\"\n+        if self.entity_type in (\"azurerm_function_app\", \"azurerm_function_app_slot\"):\n+            return \"site_config/[0]/min_tls_version\"\n+        else:\n+            return \"site_config/[0]/minimum_tls_version\"\n \n     def get_expected_value(self):\n         return 1.2\n", "issue": "Azure Function App Slots - Ensure Azure Function App Slots use at least TLS 1.2 \n**Describe the issue**\r\nIt seems that there are no checks that ensure that the following resources to use at least TLS 1.2 :\r\n\r\n- azurerm_function_app_slot\r\n- azurerm_linux_function_app_slot\r\n- azurerm_windows_function_app_slot\r\n\r\n**Examples**\r\n\r\n````hcl\r\n````hcl\r\nresource \"azurerm_function_app_slot\" \"example\" {\r\n  name                       = \"test-azure-functions_slot\"\r\n  location                   = azurerm_resource_group.example.location\r\n  resource_group_name        = azurerm_resource_group.example.name\r\n  app_service_plan_id        = azurerm_app_service_plan.example.id\r\n  function_app_name          = azurerm_function_app.example.name\r\n  storage_account_name       = azurerm_storage_account.example.name\r\n  storage_account_access_key = azurerm_storage_account.example.primary_access_key\r\n\r\n  site_config {\r\n    min_tls_version = 1.2\r\n  }\r\n}\r\n\r\nresource \"azurerm_linux_function_app_slot\" \"example\" {\r\n  name                 = \"example-linux-function-app-slot\"\r\n  function_app_id      = azurerm_linux_function_app.example.id\r\n  storage_account_name = azurerm_storage_account.example.name\r\n\r\n  site_config {\r\n    min_tls_version = 1.2\r\n  }\r\n}\r\n\r\nresource \"azurerm_windows_function_app\" \"example\" {\r\n  name                 = \"example-windows-function-app\"\r\n  resource_group_name  = azurerm_resource_group.example.name\r\n  location             = azurerm_resource_group.example.location\r\n  storage_account_name = azurerm_storage_account.example.name\r\n  service_plan_id      = azurerm_service_plan.example.id\r\n\r\n  site_config {\r\n    min_tls_version = 1.2\r\n  }\r\n}\r\n````\r\n\r\n**Version (please complete the following information):**\r\n - N/A\r\n \r\n**Additional context**\r\n\r\nN/A\n", "before_files": [{"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n\n\nclass FunctionAppMinTLSVersion(BaseResourceValueCheck):\n    def __init__(self):\n        name = \"Ensure Function app is using the latest version of TLS encryption\"\n        id = \"CKV_AZURE_145\"\n        supported_resources = ['azurerm_function_app']\n        categories = [CheckCategories.NETWORKING]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources,\n                         missing_block_result=CheckResult.PASSED)\n\n    def get_inspected_key(self):\n        return \"site_config/[0]/min_tls_version\"\n\n    def get_expected_value(self):\n        return 1.2\n\n    def get_expected_values(self):\n        return [\"1.2\", 1.2]\n\n\ncheck = FunctionAppMinTLSVersion()\n", "path": "checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py"}], "after_files": [{"content": "from checkov.common.models.enums import CheckResult, CheckCategories\nfrom checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck\n\n\nclass FunctionAppMinTLSVersion(BaseResourceValueCheck):\n    def __init__(self):\n        \"\"\"\n        The minimum supported TLS version for the function app.\n        Defaults to 1.2 for new function apps.\n        field name is:\n         - min_tls_version in azurerm_function_app, azurerm_function_app_slot.\n         - minimum_tls_version in newer resources (with linux/windows).\n        \"\"\"\n        name = \"Ensure Function app is using the latest version of TLS encryption\"\n        id = \"CKV_AZURE_145\"\n        supported_resources = ['azurerm_function_app', 'azurerm_linux_function_app', 'azurerm_windows_function_app',\n                               'azurerm_function_app_slot', 'azurerm_linux_function_app_slot',\n                               'azurerm_windows_function_app_slot']\n        categories = [CheckCategories.NETWORKING]\n        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources,\n                         missing_block_result=CheckResult.PASSED)\n\n    def get_inspected_key(self):\n        if self.entity_type in (\"azurerm_function_app\", \"azurerm_function_app_slot\"):\n            return \"site_config/[0]/min_tls_version\"\n        else:\n            return \"site_config/[0]/minimum_tls_version\"\n\n    def get_expected_value(self):\n        return 1.2\n\n    def get_expected_values(self):\n        return [\"1.2\", 1.2]\n\n\ncheck = FunctionAppMinTLSVersion()\n", "path": "checkov/terraform/checks/resource/azure/FunctionAppMinTLSVersion.py"}]}