โญ Repository โ ๐ Compliance Engine โ ๐ CloudAware โ ๐ Google โ ๐ GCE โ ๐ก๏ธ Disk is idle๐ข
๐ง Google GCE Disk is idle - prod.logic.yaml๐ข
- Contextual name: ๐ง prod.logic.yaml๐ข
- ID:
/ce/ca/google/compute-engine/disk-idle/prod.logic.yaml
- Tags:
- ๐ข Logic test success
- ๐ข Logic with extracts
- ๐ข Logic with test data
Usesโ
- ๐ Google GCE Disk
- ๐ Google GCE Attached Disk - object.extracts.yaml
- ๐ Google GCE Disk - object.extracts.yaml
- ๐งช test-data.json
Test Results ๐ขโ
Generated at: 2025-10-01T12:50:03.715038458Z Open
Result | Id | Condition Index | Condition Text | Runtime 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โ
File | MD5 | |
---|---|---|
Open | /ce/ca/google/compute-engine/disk-idle/policy.yaml | D6C0B14ABE4F1ACEFB50566BC5A16858 |
Open | /ce/ca/google/compute-engine/disk-idle/prod.logic.yaml | 1071D65A2A3862710621592FFBD09BF4 |
Open | /ce/ca/google/compute-engine/disk-idle/test-data.json | 5B19765F909ACAF7AD6494B7303A5AC5 |
Open | /types/CA10__CaGoogleGceAttachedDisk__c/object.extracts.yaml | C407407BDFFAF78A79682CE4D7011F10 |
Open | /types/CA10__CaGoogleGceDisk__c/object.extracts.yaml | F5FBF499DD82D232510DAAB4BE3A5BE9 |
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โ
---
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."