---

inputType: "CA10G1__CaGoogleLoggingLogSink__c"
testData:
  - file: test-data.json
importExtracts:
  - file: /types/CA10G1__CaGoogleLoggingLogSink__c/object.extracts.yaml
  - file: /types/CA10__CaGoogleStorageBucket__c/object.extracts.yaml
conditions:
  - status: "INAPPLICABLE"
    currentStateMessage: "The Sink does not export logs into a bucket."
    check:
      IS_EMPTY_LOOKUP: "CA10G1__bucket__r"
  - status: "COMPLIANT"
    currentStateMessage: "Sink with a locked bucket."
    check:
      IS_EQUAL:
        left:
          EXTRACT: "CA10G1__bucket__r.CA10__retentionPolicyLock__c"
        right:
          TEXT: "Locked"
otherwise:
  status: "INCOMPLIANT"
  currentStateMessage: "The sink is configured to export logs in a storage bucket without a lock."
  remediationMessage: "Enable a retention policy and Bucket Lock."
