Repository: bridgecrewio/checkov

Issue:
Azure Redis Cache - Ensure standard replication is enabled
**Describe the issue**
It seems that there is no checkov that checks if the Azure Redis Cache has "Standard replication" enabled
 

**Examples**

````hcl
resource "azurerm_redis_cache" "example" {
  name                = "example-cache"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  capacity            = 2
  family              = "C"
  sku_name            = "Standard"
  enable_non_ssl_port = false
  minimum_tls_version = "1.2"

  redis_configuration {
  }
}
````

**Version (please complete the following information):**
 - N/A
 
**Additional context**

With [Standard Replication](https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-high-availability#standard-replication-for-high-availability), Azure Cache for Redis has a high availability architecture that ensures your managed instance is functioning, even when outages affect the underlying virtual machines (VMs). Whether the outage is planned or unplanned outages, Azure Cache for Redis delivers greater percentage availability rates than what's attainable by hosting Redis on a single VM.

An Azure Cache for Redis in the applicable tiers runs on a pair of Redis servers by default. The two servers are hosted on dedicated VMs. Open-source Redis allows only one server to handle data write requests.

This is automatically enabled with the SKUs is either:

- Standard
- Premium
- Enterprise
- Enterprise Flash


Discussion:

Resolving patch:
diff --git a/checkov/terraform/checks/resource/azure/RedisCacheStandardReplicationEnabled.py b/checkov/terraform/checks/resource/azure/RedisCacheStandardReplicationEnabled.py
new file mode 100644
--- /dev/null
+++ b/checkov/terraform/checks/resource/azure/RedisCacheStandardReplicationEnabled.py
@@ -0,0 +1,35 @@
+from __future__ import annotations
+
+from typing import Any
+
+from checkov.common.models.enums import CheckCategories
+from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
+
+
+class RedisCacheStandardReplicationEnabled(BaseResourceValueCheck):
+    def __init__(self) -> None:
+        """
+        With Standard Replication, Azure Cache for Redis has a high availability architecture
+        that ensures your managed instance is functioning, even when outages affect
+        the underlying virtual machines (VMs). Whether the outage is planned or unplanned outages,
+        Azure Cache for Redis delivers greater percentage availability rates than what's attainable
+        by hosting Redis on a single VM.
+
+        An Azure Cache for Redis in the applicable tiers runs on a pair of Redis servers by default.
+        The two servers are hosted on dedicated VMs.
+        Open-source Redis allows only one server to handle data write requests.
+        """
+        name = "Standard Replication should be enabled"
+        id = "CKV_AZURE_230"
+        supported_resources = ("azurerm_redis_cache",)
+        categories = (CheckCategories.BACKUP_AND_RECOVERY,)
+        super().__init__(name=name, id=id, categories=categories, supported_resources=supported_resources)
+
+    def get_inspected_key(self) -> str:
+        return "sku_name"
+
+    def get_expected_values(self) -> list[Any]:
+        return ["Standard", "Premium"]
+
+
+check = RedisCacheStandardReplicationEnabled()


Test patch:
diff --git a/tests/terraform/checks/resource/azure/example_RedisCacheStandardReplicationEnabled/main.tf b/tests/terraform/checks/resource/azure/example_RedisCacheStandardReplicationEnabled/main.tf
new file mode 100644
--- /dev/null
+++ b/tests/terraform/checks/resource/azure/example_RedisCacheStandardReplicationEnabled/main.tf
@@ -0,0 +1,41 @@
+resource "azurerm_redis_cache" "pass1" {
+  name                = "example-cache"
+  location            = azurerm_resource_group.example.location
+  resource_group_name = azurerm_resource_group.example.name
+  capacity            = 2
+  family              = "C"
+  sku_name            = "Standard"
+  enable_non_ssl_port = false
+  minimum_tls_version = "1.2"
+
+  redis_configuration {
+  }
+}
+
+resource "azurerm_redis_cache" "pass2" {
+  name                = "example-cache"
+  location            = azurerm_resource_group.example.location
+  resource_group_name = azurerm_resource_group.example.name
+  capacity            = 2
+  family              = "C"
+  sku_name            = "Premium"
+  enable_non_ssl_port = false
+  minimum_tls_version = "1.2"
+
+  redis_configuration {
+  }
+}
+
+resource "azurerm_redis_cache" "fail1" {
+  name                = "example-cache"
+  location            = azurerm_resource_group.example.location
+  resource_group_name = azurerm_resource_group.example.name
+  capacity            = 2
+  family              = "C"
+  sku_name            = "Basic"
+  enable_non_ssl_port = false
+  minimum_tls_version = "1.2"
+
+  redis_configuration {
+  }
+}
diff --git a/tests/terraform/checks/resource/azure/test_RedisCacheStandardReplicationEnabled.py b/tests/terraform/checks/resource/azure/test_RedisCacheStandardReplicationEnabled.py
new file mode 100644
--- /dev/null
+++ b/tests/terraform/checks/resource/azure/test_RedisCacheStandardReplicationEnabled.py
@@ -0,0 +1,42 @@
+import os
+import unittest
+
+from checkov.runner_filter import RunnerFilter
+from checkov.terraform.runner import Runner
+from checkov.terraform.checks.resource.azure.RedisCacheStandardReplicationEnabled import check
+
+
+class TestRedisCacheStandardReplicationEnabled(unittest.TestCase):
+
+    def test(self):
+        runner = Runner()
+        current_dir = os.path.dirname(os.path.realpath(__file__))
+
+        test_files_dir = os.path.join(current_dir, "example_RedisCacheStandardReplicationEnabled")
+        report = runner.run(root_folder=test_files_dir,
+                            runner_filter=RunnerFilter(checks=[check.id]))
+        summary = report.get_summary()
+
+        passing_resources = {
+            'azurerm_redis_cache.pass1',
+            'azurerm_redis_cache.pass2'
+        }
+        failing_resources = {
+            'azurerm_redis_cache.fail1'
+        }
+        skipped_resources = {}
+
+        passed_check_resources = set([c.resource for c in report.passed_checks])
+        failed_check_resources = set([c.resource for c in report.failed_checks])
+
+        self.assertEqual(summary['passed'], len(passing_resources))
+        self.assertEqual(summary['failed'], len(failing_resources))
+        self.assertEqual(summary['skipped'], len(skipped_resources))
+        self.assertEqual(summary['parsing_errors'], 0)
+
+        self.assertEqual(passing_resources, passed_check_resources)
+        self.assertEqual(failing_resources, failed_check_resources)
+
+
+if __name__ == '__main__':
+    unittest.main()
\ No newline at end of file