Skip to main content

🧠 Google Logging Log Sink for All Log Entries is not configured - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• Google ProjectCA10__CaGoogleProject__c2116

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:47:12.487465028Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒aKAIβœ”οΈ 199βœ”οΈ CA10__Google_Resource_Manager_Projects__r.has(COMPLIANT)βœ”οΈ null
🟒aTKAYβœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒aTKAY5βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒atKAI22βœ”οΈ 199βœ”οΈ CA10__Google_Resource_Manager_Projects__r.has(COMPLIANT)βœ”οΈ null
🟒aAY22βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒atKAI33βœ”οΈ 199βœ”οΈ CA10__Google_Resource_Manager_Projects__r.has(COMPLIANT)βœ”οΈ null
🟒aB1TKAY33βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/google/logging/sinks-configuration/policy.yamlFB32B87A29B08CF7E8396410B50D96BC
Open/ce/ca/google/logging/sinks-configuration/prod.logic.yamlCA98E03FF04EC0C24547E3F02CD40C0C
Open/ce/ca/google/logging/sinks-configuration/test-data.json668BDFEEB4133021CA54DC7D37A33665
Open/types/CA10G1__CaGoogleLoggingLogSink__c/object.extracts.yaml0A52360258DB3850B42C9067DA520816

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/google/logging/sinks-configuration/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/google/logging/sinks-configuration/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/google/logging/sinks-configuration/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/google/logging/sinks-configuration/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/google/logging/sinks-configuration/prod.logic.yaml

Content​

Open File

---

inputType: "CA10__CaGoogleProject__c"
testData:
- file: test-data.json
conditions:
- status: "COMPLIANT"
currentStateMessage: "Sinks are configured for all log entries"
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__Google_Resource_Manager_Projects__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "The project does not have sinks configured for all log entries."
remediationMessage: "It is recommended to create a sink that will export copies of all the log entries."
relatedLists:
- relationshipName: "CA10__Google_Resource_Manager_Projects__r"
importExtracts:
- file: /types/CA10G1__CaGoogleLoggingLogSink__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "Resource Manager Organization or Folder or Project with COMPLIANT Sink."
check:
OR:
args:
- RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10G1__Google_Logging_Log_Sinks1__r"
- RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__resourceManagerFolder__r.CA10G1__Google_Logging_Log_Sinks1__r"
- RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__resourceManagerOrganization__r.CA10G1__Google_Logging_Log_Sinks1__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "There is no COMPLIANT sink connected with project."
relatedLists:
# # ORG level
- relationshipName: "CA10__resourceManagerOrganization__r.CA10G1__Google_Logging_Log_Sinks1__r"
recordTypes:
- "caGoogleLoggingLogSinkOrganization"
conditions:
- status: "COMPLIANT"
currentStateMessage: "Resource Manager Organization with COMPLIANT Sink"
check:
AND:
args:
- IS_EMPTY:
arg:
EXTRACT: "CA10G1__filter__c"
- NOT_EMPTY:
arg:
EXTRACT: "CA10G1__destination__c"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "Resource Manager Organization does not have sinks configured for all log entries."
# FOLDER level
- relationshipName: "CA10__resourceManagerFolder__r.CA10G1__Google_Logging_Log_Sinks1__r"
recordTypes:
- "caGoogleLoggingLogSinkFolder"
conditions:
- status: "COMPLIANT"
currentStateMessage: "Resource Manager Folder with COMPLIANT Sink."
check:
AND:
args:
- IS_EMPTY:
arg:
EXTRACT: "CA10G1__filter__c"
- NOT_EMPTY:
arg:
EXTRACT: "CA10G1__destination__c"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "Resource Manager Folder does not have sinks configured for all log entries."
# PROJECT level
- relationshipName: "CA10G1__Google_Logging_Log_Sinks1__r"
recordTypes:
- "caGoogleLoggingLogSinkProject"
conditions:
- status: "COMPLIANT"
currentStateMessage: "Resource Manager Project with COMPLIANT Sink."
check:
AND:
args:
- IS_EMPTY:
arg:
EXTRACT: "CA10G1__filter__c"
- NOT_EMPTY:
arg:
EXTRACT: "CA10G1__destination__c"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "Resource Manager Project does not have sinks configured for all log entries."