π§ Google Logging Log Sink exports logs to a Storage Bucket without Bucket Lock - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/google/logging/storage-bucket-retention-policy/prod.logic.yaml
- Located in: π Google Logging Log Sink exports logs to a Storage Bucket without Bucket Lock π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π Google Logging Log Sink | CA10G1__CaGoogleLoggingLogSink__c | 2 | 1 | 1 |
Usesβ
- π Google Storage Bucket - object.extracts.yaml
- π Google Logging Log Sink - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-04-24T23:47:14.173552124Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | a0oVU111 | βοΈ 99 | βοΈ isDisappeared(CA10G1__disappearanceTime__c) | βοΈ null |
π’ | a0oV222 | βοΈ 199 | βοΈ isEmptyLookup('CA10G1__bucket__r') | βοΈ null |
π’ | a0o33 | βοΈ 300 | βοΈ otherwise | βοΈ null |
π’ | a0oV44 | βοΈ 299 | βοΈ extract('CA10G1__bucket__r.CA10__retentionPolicyLock__c') == 'Locked' | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/google/logging/storage-bucket-retention-policy/policy.yaml | 81CA6BDD85D9E444F5B457B9D4C7AE64 |
Open | /ce/ca/google/logging/storage-bucket-retention-policy/prod.logic.yaml | 7826ABD586C51235627C4C5D598F2C96 |
Open | /types/CA10__CaGoogleStorageBucket__c/object.extracts.yaml | 3651E2495E157A71A7AF35D341E7F6F2 |
Open | /ce/ca/google/logging/storage-bucket-retention-policy/test-data.json | 3E16BC85ED910FF9D79EA85C663293AF |
Open | /types/CA10G1__CaGoogleLoggingLogSink__c/object.extracts.yaml | 0A52360258DB3850B42C9067DA520816 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/google/logging/storage-bucket-retention-policy/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/google/logging/storage-bucket-retention-policy/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/google/logging/storage-bucket-retention-policy/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/google/logging/storage-bucket-retention-policy/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/google/logging/storage-bucket-retention-policy/prod.logic.yaml
Contentβ
---
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."