---
inputType: "CA10__CaAwsInstance__c"
importExtracts:
  - file: "/types/CA10__CaAwsInstance__c/object.extracts.yaml"
testData:
  - file: "test-data.json"
conditions:
  - status: "INAPPLICABLE"
    currentStateMessage: "The EC2 instance is not running."
    check:
      NOT_EQUAL:
        left:
          EXTRACT: "CA10__stateName__c"
        right:
          TEXT: "running"
  - status: "INCOMPLIANT"
    currentStateMessage: "The instance is running without detailed monitoring enabled."
    remediationMessage: "Consider enabling detailed monitoring for the instance."
    check:
      IS_EQUAL:
        left:
          EXTRACT: "CA10__monitoringState__c"
        right:
          TEXT: "disabled"
  - status: "COMPLIANT"
    currentStateMessage: "Detailed monitoring for the instance is enabled."
    check:
      IS_EQUAL:
        left:
          EXTRACT: "CA10__monitoringState__c"
        right:
          TEXT: "enabled"
otherwise:
  status: "UNDETERMINED"
  currentStateMessage: "Unexpected values in the field."
