From 297e028d7fd61b58744a257b4f9732d76321802d Mon Sep 17 00:00:00 2001 From: ChanochShayner <57212002+ChanochShayner@users.noreply.github.com> Date: Mon, 29 Jul 2024 12:33:22 +0300 Subject: [PATCH] Apply suggestions from code review --- checkov/arm/checks/resource/ACREnableZoneRedundancy.py | 2 +- .../checks/resource/example_ACREnableZoneRedundancy/fail1.json | 2 +- .../checks/resource/example_ACREnableZoneRedundancy/fail2.json | 2 +- .../checks/resource/example_ACREnableZoneRedundancy/pass.json | 2 +- .../checks/resource/example_ACREnableZoneRedundancy/pass2.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/checkov/arm/checks/resource/ACREnableZoneRedundancy.py b/checkov/arm/checks/resource/ACREnableZoneRedundancy.py index 9026f2c2db3..da146a84344 100644 --- a/checkov/arm/checks/resource/ACREnableZoneRedundancy.py +++ b/checkov/arm/checks/resource/ACREnableZoneRedundancy.py @@ -23,7 +23,7 @@ def scan_resource_conf(self, conf: dict[str, list[Any]]) -> CheckResult: # check registry. default=false properties = conf.get("properties") if properties and isinstance(properties, dict): - if properties.get("zoneRedundancy") == "disabled": + if properties.get("zoneRedundancy") == "Disabled": return CheckResult.FAILED return CheckResult.PASSED diff --git a/tests/arm/checks/resource/example_ACREnableZoneRedundancy/fail1.json b/tests/arm/checks/resource/example_ACREnableZoneRedundancy/fail1.json index 84bcf304070..8e2c9c7d2ea 100644 --- a/tests/arm/checks/resource/example_ACREnableZoneRedundancy/fail1.json +++ b/tests/arm/checks/resource/example_ACREnableZoneRedundancy/fail1.json @@ -19,7 +19,7 @@ "properties": { "adminUserEnabled": "[parameters('acrAdminUserEnabled')]", "zoneRedundancy": - "disabled" + "Disabled" } } ] diff --git a/tests/arm/checks/resource/example_ACREnableZoneRedundancy/fail2.json b/tests/arm/checks/resource/example_ACREnableZoneRedundancy/fail2.json index ca9e411e08e..fd1181c7712 100644 --- a/tests/arm/checks/resource/example_ACREnableZoneRedundancy/fail2.json +++ b/tests/arm/checks/resource/example_ACREnableZoneRedundancy/fail2.json @@ -11,7 +11,7 @@ "[resourceId('Microsoft.ContainerRegistry/registries/', parameters('acrName'))]" ], "properties": { - "zoneRedundancy": "disabled" + "zoneRedundancy": "Disabled" } } ], diff --git a/tests/arm/checks/resource/example_ACREnableZoneRedundancy/pass.json b/tests/arm/checks/resource/example_ACREnableZoneRedundancy/pass.json index 3049af30d93..371c3b60e4e 100644 --- a/tests/arm/checks/resource/example_ACREnableZoneRedundancy/pass.json +++ b/tests/arm/checks/resource/example_ACREnableZoneRedundancy/pass.json @@ -18,7 +18,7 @@ }, "properties": { "adminUserEnabled": "[parameters('acrAdminUserEnabled')]", - "zoneRedundancy": "enabled" + "zoneRedundancy": "Enabled" } }] } \ No newline at end of file diff --git a/tests/arm/checks/resource/example_ACREnableZoneRedundancy/pass2.json b/tests/arm/checks/resource/example_ACREnableZoneRedundancy/pass2.json index 5b0f25d7778..48cb8ede926 100644 --- a/tests/arm/checks/resource/example_ACREnableZoneRedundancy/pass2.json +++ b/tests/arm/checks/resource/example_ACREnableZoneRedundancy/pass2.json @@ -10,7 +10,7 @@ "[resourceId('Microsoft.ContainerRegistry/registries/', parameters('acrName'))]" ], "properties": { - "zoneRedundancy": "enabled" + "zoneRedundancy": "Enabled" }, "outputs": {