β Repository β π Compliance Engine β π CloudAware β π AWS β π Redshift β π‘οΈ Cluster is underutilizedπ’
π§ AWS Redshift Cluster is underutilized - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/redshift/cluster-underutilized/prod.logic.yaml
- Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
Test Results π’β
Generated at: 2025-10-01T12:45:57.553704375Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | 001 | βοΈ 199 | βοΈ extract('CA10__status__c') != 'available' | βοΈ null |
π’ | 002 | βοΈ 299 | βοΈ not(extract('CA10__createTime__c').beyondLastDays(30)) | βοΈ null |
π’ | 003 | βοΈ 399 | βοΈ extract('CA10__cpuUtilizationAvg30d__c').isEmpty() || extract('CA10__diskReadIopsAvg30d__c').isEmpty() || extract('CA10__diskWriteIopsAvg30d__c').isEmpty() | βοΈ null |
π’ | 004 | βοΈ 499 | βοΈ extract('CA10__cpuUtilizationAvg30d__c') < number(20.0) && extract('CA10__diskReadIopsAvg30d__c') < number(50.0) && extract('CA10__diskWriteIopsAvg30d__c') < number(50.0) | βοΈ null |
π’ | 005 | βοΈ 500 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/redshift/cluster-underutilized/policy.yaml | 89DB0905DC1FCCAB9792567A50D22425 |
Open | /ce/ca/aws/redshift/cluster-underutilized/prod.logic.yaml | F1025F344F9E1CB87A970F31D6BEA0C9 |
Open | /ce/ca/aws/redshift/cluster-underutilized/test-data.json | 595C8EFCDD78D5E2A9AC74CFFECCA83F |
Open | /types/CA10__CaAwsRedshiftCluster__c/object.extracts.yaml | 0B799D033E0DBD261DF12B8BA7E202C8 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/redshift/cluster-underutilized/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/redshift/cluster-underutilized/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/redshift/cluster-underutilized/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/redshift/cluster-underutilized/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/redshift/cluster-underutilized/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsRedshiftCluster__c"
importExtracts:
- file: "/types/CA10__CaAwsRedshiftCluster__c/object.extracts.yaml"
testData:
- file: 'test-data.json'
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The cluster is not available."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "available"
- status: "INAPPLICABLE"
currentStateMessage: "The cluster 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 cluster is underutilized."
check:
OR:
args:
- IS_EMPTY:
arg:
EXTRACT: "CA10__cpuUtilizationAvg30d__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10__diskReadIopsAvg30d__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10__diskWriteIopsAvg30d__c"
- status: "INCOMPLIANT"
currentStateMessage: "The cluster is underutilized with Average CPU Utilization < 20%, Average \
\ Disk I/O < 50 IOPS."
remediationMessage: "Consider rightsizing the cluster."
check:
AND:
args:
- LESS_THAN:
left:
EXTRACT: "CA10__cpuUtilizationAvg30d__c"
right:
NUMBER: 20.0
- LESS_THAN:
left:
EXTRACT: "CA10__diskReadIopsAvg30d__c"
right:
NUMBER: 50.0
- LESS_THAN:
left:
EXTRACT: "CA10__diskWriteIopsAvg30d__c"
right:
NUMBER: 50.0
otherwise:
status: "COMPLIANT"
currentStateMessage: 'The cluster is not underutilized.'