---
inputType: "CA10__CaAwsDbCluster__c"
testData:
  - file: test-data.json
importExtracts:
  - file: /types/CA10__CaAwsDbCluster__c/object.extracts.yaml
conditions:
  - status: "INAPPLICABLE"
    currentStateMessage: "This policy applies only to Multi-AZ RDS clusters."
    check: 
      NOT:
        arg:
          EXTRACT: CA10__multiAZ__c # multiAZ != true
  - status: "INCOMPLIANT"
    currentStateMessage: "The Cluster's Auto Minor Version Upgrade feature is not enabled."
    remediationMessage: "Enable the Auto Minor Version Upgrade feature for the Cluster."
    check: 
      IS_EQUAL:
        left:
          EXTRACT: CA10__autoMinorVersionUpgrade__c
        right:
          TEXT: "No" 
  - status: "COMPLIANT"
    currentStateMessage: "The Cluster's Auto Minor Version Upgrade feature is enabled."
    check: 
      IS_EQUAL:
        left:
          EXTRACT: CA10__autoMinorVersionUpgrade__c
        right:
          TEXT: "Yes" 
otherwise:
  status: "UNDETERMINED"
  currentStateMessage: "Unexpected values in the field."
