---
inputType: "CA10__CaAwsElasticsearchDomain__c"
testData:
  - file: "test-data.json"
importExtracts:
  - file: "/types/CA10__CaAwsElasticsearchDomain__c/object.extracts.yaml"
conditions:
  - status: "INCOMPLIANT"
    currentStateMessage: "The OpenSearch domain is not encrypted at rest."
    remediationMessage: "Encryption at rest cannot be enabled on an existing domain.\
      \ A new domain must be created with encryption enabled."
    check:
      NOT:
        arg:
          EXTRACT: "CA10__encryptionAtRestEnabled__c"    
otherwise:
  status: "COMPLIANT"
  currentStateMessage: "The OpenSearch domain is encrypted at rest."