CKV_GCP_1 - BaseResourceValueCheck class implementation
-from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
+from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
from checkov.common.models.enums import CheckResult, CheckCategories
-class GKEClusterLogging(BaseResourceCheck):
+class GKEClusterLogging(BaseResourceValueCheck):
def __init__(self):
name = "Ensure Stackdriver Logging is set to Enabled on Kubernetes Engine Clusters"
id = "CKV_GCP_1"
@@ -22,5 +22,8 @@ class GKEClusterLogging(BaseResourceCheck):
return CheckResult.FAILED
return CheckResult.PASSED
+ def get_inspected_key(self):
+ return 'logging_service/[0]'
+
check = GKEClusterLogging()
