π§ AWS OpenSearch Domain Instance Count is fewer than three - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/opensearch/domain-instance-count/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
Test Results π’β
Generated at: 2025-12-27T12:02:05.750250802Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
| π’ | test2 | βοΈ 299 | βοΈ extract('CA10__clusterConfigZoneAwarenessEnabled__c') == 'false' | βοΈ null |
| π’ | test3 | βοΈ 399 | βοΈ extract('CA10__clusterConfigInstanceCount__c') < number(3.0) | βοΈ null |
| π’ | test4 | βοΈ 499 | βοΈ extract('CA10__clusterConfigZoneAwarenessEnabled__c') == 'true' && extract('CA10__clusterConfigInstanceCount__c') >= number(3.0) | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/aws/opensearch/domain-instance-count/policy.yaml | 2DF952BD621B987F445566B8E6B27CF8 |
| Open | /ce/ca/aws/opensearch/domain-instance-count/prod.logic.yaml | 5456E38187DFF7E4365B28A96E8C73C9 |
| Open | /ce/ca/aws/opensearch/domain-instance-count/test-data.json | 5FC3DA87273D1BB4697BE87F074CD1A9 |
| Open | /types/CA10__CaAwsElasticsearchDomain__c/object.extracts.yaml | 0D5B1BE6E92CCF38D456A62B74D84E17 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/opensearch/domain-instance-count/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/opensearch/domain-instance-count/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/opensearch/domain-instance-count/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/opensearch/domain-instance-count/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/opensearch/domain-instance-count/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsElasticsearchDomain__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10__CaAwsElasticsearchDomain__c/object.extracts.yaml"
conditions:
- status: "UNDETERMINED"
currentStateMessage: "The instance count or zone awareness status is not populated in the CMDB."
check:
OR:
args:
- IS_EMPTY:
arg:
EXTRACT: "CA10__clusterConfigInstanceCount__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10__clusterConfigZoneAwarenessEnabled__c"
- status: "INCOMPLIANT"
currentStateMessage: "Zone Awareness is disabled for this OpenSearch domain."
remediationMessage: "Enable Zone Awareness to distribute nodes across multiple Availability Zones."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__clusterConfigZoneAwarenessEnabled__c"
right:
TEXT: "false"
- status: "INCOMPLIANT"
currentStateMessage: "The OpenSearch Domain has fewer than 3 instances."
remediationMessage: "Increase the instance count to at least 3 for high availability."
check:
LESS_THAN:
left:
EXTRACT: "CA10__clusterConfigInstanceCount__c"
right:
NUMBER: 3.0
- status: "COMPLIANT"
currentStateMessage: "The OpenSearch domain has at least 3 instances and Zone Awareness is enabled."
check:
AND:
args:
- IS_EQUAL:
left:
EXTRACT: "CA10__clusterConfigZoneAwarenessEnabled__c"
right:
TEXT: "true"
- GREATER_THAN_EQUAL:
left:
EXTRACT: "CA10__clusterConfigInstanceCount__c"
right:
NUMBER: 3.0
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."