---
inputType: "CA10__CaAwsCacheCluster__c"
testData:
  - file: "test-data.json"
importExtracts:
  - file: /types/CA10__CaAwsCacheCluster__c/object.extracts.yaml
conditions:
  - status: "INAPPLICABLE"
    currentStateMessage: "The policy only applicable to Redis Clusters."
    check:
      NOT_EQUAL:
        left:
          EXTRACT: "CA10__engine__c"
        right:
          TEXT: "redis"
  - status: "INCOMPLIANT"
    currentStateMessage: "ElastiCache Cluster Auto Minor Version Upgrade is not enabled."
    remediationMessage: "Consider enabling Auto Minor Version Upgrade for this ElastiCache Cluster."    
    check: 
      NOT:
        arg:
          EXTRACT: CA10__autoMinorVersionUpgrade__c # autoMinorVersionUpgrade != true
otherwise:
  status: "COMPLIANT"
  currentStateMessage: "ElastiCache Cluster Auto Minor Version Upgrade is enabled."
