Skip to main content

โญ Repository โ†’ ๐Ÿ“ Compliance Engine โ†’ ๐Ÿ“ CloudAware โ†’ ๐Ÿ“ Google โ†’ ๐Ÿ“ GCE โ†’ ๐Ÿ›ก๏ธ Disk is idle๐ŸŸข

๐Ÿง  Google GCE Disk is idle - prod.logic.yaml๐ŸŸข

Usesโ€‹

Test Results ๐ŸŸขโ€‹

Generated at: 2025-10-01T12:50:03.715038458Z Open

ResultIdCondition IndexCondition TextRuntime Error
๐ŸŸขtest1โœ”๏ธ 99โœ”๏ธ isDisappeared(CA10__disappearanceTime__c)โœ”๏ธ null
๐ŸŸขtest2โœ”๏ธ 199โœ”๏ธ extract('CA10__creationDate__c').withinLastDays(30)โœ”๏ธ null
๐ŸŸขtest3โœ”๏ธ 299โœ”๏ธ extract('CA10__lastAttach__c').isEmpty()โœ”๏ธ null
๐ŸŸขtest4โœ”๏ธ 399โœ”๏ธ CA10__Google_GCE_Attached_Disks__r.has(INAPPLICABLE)โœ”๏ธ null
๐ŸŸขtest5โœ”๏ธ 499โœ”๏ธ CA10__Google_GCE_Attached_Disks__r.has(COMPLIANT)โœ”๏ธ null
๐ŸŸขtest6โœ”๏ธ 599โœ”๏ธ extract('CA10__lastDetach__c').isEmpty()โœ”๏ธ null
๐ŸŸขtest7โœ”๏ธ 699โœ”๏ธ extract('CA10__lastDetach__c').withinLastDays(30)โœ”๏ธ null
๐ŸŸขtest8โœ”๏ธ 799โœ”๏ธ extract('CA10__lastDetach__c').beyondLastDays(30)โœ”๏ธ null

Generation Bundleโ€‹

FileMD5
Open/ce/ca/google/compute-engine/disk-idle/policy.yamlD6C0B14ABE4F1ACEFB50566BC5A16858
Open/ce/ca/google/compute-engine/disk-idle/prod.logic.yaml1071D65A2A3862710621592FFBD09BF4
Open/ce/ca/google/compute-engine/disk-idle/test-data.json5B19765F909ACAF7AD6494B7303A5AC5
Open/types/CA10__CaGoogleGceAttachedDisk__c/object.extracts.yamlC407407BDFFAF78A79682CE4D7011F10
Open/types/CA10__CaGoogleGceDisk__c/object.extracts.yamlF5FBF499DD82D232510DAAB4BE3A5BE9

Available Commandsโ€‹

repo-manager policies generate FULL /ce/ca/google/compute-engine/disk-idle/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/google/compute-engine/disk-idle/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/google/compute-engine/disk-idle/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/google/compute-engine/disk-idle/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/google/compute-engine/disk-idle/prod.logic.yaml

Contentโ€‹

Open File

---
inputType: "CA10__CaGoogleGceDisk__c"
importExtracts:
- file: "/types/CA10__CaGoogleGceDisk__c/object.extracts.yaml"
testData:
- file: 'test-data.json'
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The Disk has been created less than 30 days ago."
check:
IS_WITHIN_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: "CA10__creationDate__c"
- status: "INCOMPLIANT"
currentStateMessage: "The Disk hasn't been attached to a VM since creation."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10__lastAttach__c"
- status: "INAPPLICABLE"
currentStateMessage: "The Disk is not persistent."
check:
RELATED_LIST_HAS:
status: "INAPPLICABLE"
relationshipName: "CA10__Google_GCE_Attached_Disks__r"
- status: "COMPLIANT"
currentStateMessage: "The Disk is attached to a VM."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__Google_GCE_Attached_Disks__r"
- status: "COMPLIANT"
currentStateMessage: "The Disk is attached to a VM."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10__lastDetach__c"
- status: "COMPLIANT"
currentStateMessage: "The Disk was detached within the last 30 days."
check:
IS_WITHIN_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: "CA10__lastDetach__c"
- status: "INCOMPLIANT"
currentStateMessage: "The Disk was detached more than 30 days ago."
check:
IS_BEYOND_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: "CA10__lastDetach__c"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."
relatedLists:
- relationshipName: "CA10__Google_GCE_Attached_Disks__r"
importExtracts:
- file: "/types/CA10__CaGoogleGceAttachedDisk__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The Disk is not persistent."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__type__c"
right:
TEXT: "PERSISTENT"
otherwise:
status: "COMPLIANT"
currentStateMessage: "The Disk is attached to a VM."