β Repository β π Compliance Engine β π CloudAware β π AWS β π RDS β π‘οΈ Instance is idleπ’
π§ AWS RDS Instance is idle - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/rds/instance-idle/prod.logic.yaml
- Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
Test Results π’β
Generated at: 2025-10-01T12:45:50.297059535Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | 001 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
π’ | 002 | βοΈ 499 | βοΈ extract('CA10__averageCpuOneMonth__c') < number(5.0) && extract('CA10__databaseConnectionsAvg30d__c') <= number(0.0) | βοΈ null |
π’ | 003 | βοΈ 500 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/rds/instance-idle/policy.yaml | 4DC8A68B24DB41A0D067373547A7A183 |
Open | /ce/ca/aws/rds/instance-idle/prod.logic.yaml | C75733160CC753A2BDAC9AE0D75A8D95 |
Open | /ce/ca/aws/rds/instance-idle/test-data.json | 56A8FF993AD905D291FF8789E772027C |
Open | /types/CA10__CaAwsDbInstance__c/object.extracts.yaml | 0E769BD71AE72B63B1A02CBF1C462F5B |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/rds/instance-idle/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/rds/instance-idle/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/rds/instance-idle/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/rds/instance-idle/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/rds/instance-idle/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsDbInstance__c"
importExtracts:
- file: "/types/CA10__CaAwsDbInstance__c/object.extracts.yaml"
testData:
- file: 'test-data.json'
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The instance is not available."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "available"
- status: "INAPPLICABLE"
currentStateMessage: "The instance has been created less than 30 days ago."
check:
NOT:
arg:
IS_BEYOND_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: "CA10__createTime__c"
- status: UNDETERMINED
currentStateMessage: "There is not enough data in the CMDB to identify if the instance is idle."
check:
OR:
args:
- IS_EMPTY:
arg:
EXTRACT: "CA10__averageCpuOneMonth__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10__databaseConnectionsAvg30d__c"
- status: "INCOMPLIANT"
currentStateMessage: "The instance is idle with Average CPU Utilization < 5%, Average Database Connections = 0."
remediationMessage: "Consider terminating or down-sizing the instance."
check:
AND:
args:
- LESS_THAN:
left:
EXTRACT: "CA10__averageCpuOneMonth__c"
right:
NUMBER: 5.0
- LESS_THAN_EQUAL:
left:
EXTRACT: "CA10__databaseConnectionsAvg30d__c"
right:
NUMBER: 0.0
otherwise:
status: "COMPLIANT"
currentStateMessage: "The instance is not idle."