Skip to main content

🧠 Oracle Cloud Guard is not enabled in the root compartment - prod.logic.yaml🟒

Uses​

Test Results πŸŸ’β€‹

Generated at: 2026-05-02T12:07:20.466398757Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 199βœ”οΈ CA10O1__Oracle_Cloud_Guard_Targets__r.has(COMPLIANT)βœ”οΈ null
🟒test2βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒test3βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒test4βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null

Generation Bundle​

FileMD5
Open/ce/ca/oracle/cloud-guard/cloud-guard-in-root-compartment/policy.yamlFB5D751BBA27A04668EE8E1A3B65D6AD
Open/ce/ca/oracle/cloud-guard/cloud-guard-in-root-compartment/prod.logic.yamlFBABF9B0A9700CA8A561990578101F44
Open/ce/ca/oracle/cloud-guard/cloud-guard-in-root-compartment/test-data.json7CE9ACA7D374548CDDA1E6703D219455
Open/types/CA10O1__CaOracleCloudGuardTarget__c/object.extracts.yamlD827D8548A380C25217ECE7BD35304D1

Available Commands​

repo-manager policies generate FULL /ce/ca/oracle/cloud-guard/cloud-guard-in-root-compartment/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/oracle/cloud-guard/cloud-guard-in-root-compartment/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/oracle/cloud-guard/cloud-guard-in-root-compartment/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/oracle/cloud-guard/cloud-guard-in-root-compartment/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/oracle/cloud-guard/cloud-guard-in-root-compartment/prod.logic.yaml

Content​

Open File

---
inputType: "CA10O1__CaOracleTenancy__c"
testData:
- file: "test-data.json"
conditions:
- status: "COMPLIANT"
currentStateMessage: "Cloud Guard is enabled for the root compartment of this tenancy."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10O1__Oracle_Cloud_Guard_Targets__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "Cloud Guard is not enabled for the root compartment of this tenancy."
remediationMessage: "Enable Oracle Cloud Guard and configure an active target for the root compartment."
relatedLists:
- relationshipName: "CA10O1__Oracle_Cloud_Guard_Targets__r"
importExtracts:
- file: /types/CA10O1__CaOracleCloudGuardTarget__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "This active Cloud Guard target monitors the root compartment."
check:
AND:
args:
- IS_EQUAL:
left:
EXTRACT: "CA10O1__lifecycleState__c"
right:
TEXT: "ACTIVE"
- STARTS_WITH:
arg:
EXTRACT: "CA10O1__targetResourceOcid__c"
search:
TEXT: "ocid1.tenancy."
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "This Cloud Guard target is inactive or does not monitor the root compartment."