From 4eb3d333e9dad7ee2729aedc4a0e8c8a9b6ab05d Mon Sep 17 00:00:00 2001 From: Gaurav Gogia <16029099+gaurav-gogia@users.noreply.github.com> Date: Thu, 28 Jan 2021 17:09:12 +0530 Subject: [PATCH] fixes #405 --- .../checkStorageContainerAccess.rego | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/policies/opa/rego/azure/azurerm_storage_container/checkStorageContainerAccess.rego b/pkg/policies/opa/rego/azure/azurerm_storage_container/checkStorageContainerAccess.rego index 0331f15dd..84bdb2ec5 100755 --- a/pkg/policies/opa/rego/azure/azurerm_storage_container/checkStorageContainerAccess.rego +++ b/pkg/policies/opa/rego/azure/azurerm_storage_container/checkStorageContainerAccess.rego @@ -2,5 +2,13 @@ package accurics {{.prefix}}checkStorageContainerAccess[storage_container.id] { storage_container := input.azurerm_storage_container[_] - storage_container.config.container_access_type != "private" + not checkAccessType(storage_container.config.container_access_type) } + +checkAccessType(accesstype) { + contains(accesstype, "private") +} + +checkAccessType(accesstype) { + contains(accesstype, "PRIVATE") +} \ No newline at end of file