---

inputType: "CA10__CaGoogleCloudKmsCryptoKey__c"
testData:
  - file: test-data.json
importExtracts:
  - file: /types/CA10__CaGoogleCloudKmsCryptoKey__c/object.extracts.yaml
conditions:
  - status: "COMPLIANT"
    currentStateMessage: "KMS encryption key is rotated within a period of 90 days."
    check:
     AND:
      args:
        - IS_WITHIN_NEXT_DAYS:
            offsetDays: 90
            arg:
              EXTRACT: "CA10__nextRotationTime__c"
        - LESS_THAN_EQUAL:
            left:
              EXTRACT: "rotationDuration"
            right:
              DURATION: "P90D"
otherwise:
  status: "INCOMPLIANT"
  currentStateMessage: "KMS encryption key is not rotated within a period of 90 days."
  remediationMessage: "Change KMS encryption key rotation period."
