π§ AWS VPC VPN Connection does not have both Tunnels up - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/aws/vpc/vpn-connection-tunnels-not-up/prod.logic.yaml
- Located in: π AWS VPC VPN Connection does not have both Tunnels up π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π AWS VPC VPN Connection | CA10__CaAwsVpnConnection__c | 1 | 1 | 1 |
Usesβ
- π AWS VPC VPN Connection - object.extracts.yaml
- π AWS VPC VPN Gateway Telemetry - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-09-02T01:30:56.865592414Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
π’ | test2 | βοΈ 399 | βοΈ CA10__vgwTelemetries__r.count(COMPLIANT) == number(1.0) | βοΈ null |
π’ | test3 | βοΈ 499 | βοΈ CA10__vgwTelemetries__r.count(COMPLIANT) == number(0.0) | βοΈ null |
π’ | test4 | βοΈ 199 | βοΈ extract('CA10__state__c') != 'available' | βοΈ null |
π’ | test5 | βοΈ 399 | βοΈ CA10__vgwTelemetries__r.count(COMPLIANT) == number(1.0) | βοΈ null |
π’ | test6 | βοΈ 299 | βοΈ CA10__vgwTelemetries__r.count(COMPLIANT) >= number(2.0) | βοΈ null |
π’ | test7 | βοΈ 299 | βοΈ CA10__vgwTelemetries__r.count(COMPLIANT) >= number(2.0) | βοΈ null |
π’ | test8 | βοΈ 299 | βοΈ CA10__vgwTelemetries__r.count(COMPLIANT) >= number(2.0) | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/vpc/vpn-connection-tunnels-not-up/policy.yaml | 78673DB9BF369DEE3CC49BE12CD9E9F9 |
Open | /ce/ca/aws/vpc/vpn-connection-tunnels-not-up/prod.logic.yaml | A10ACC9098B3E12714CDB49B33BE49B0 |
Open | /ce/ca/aws/vpc/vpn-connection-tunnels-not-up/test-data.json | 700BC3417F0513EF493321B905A9BD46 |
Open | /types/CA10__CaAwsVpnConnection__c/object.extracts.yaml | 9B5659A3C6F6C7E429E7C0679395C259 |
Open | /types/CA10__CaAwsVgwTelemetry__c/object.extracts.yaml | 1256E8E9A9B830F090FC5D676BD63616 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/aws/vpc/vpn-connection-tunnels-not-up/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/vpc/vpn-connection-tunnels-not-up/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/vpc/vpn-connection-tunnels-not-up/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/vpc/vpn-connection-tunnels-not-up/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/aws/vpc/vpn-connection-tunnels-not-up/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsVpnConnection__c"
testData:
- file: "./test-data.json"
importExtracts:
- file: "/types/CA10__CaAwsVpnConnection__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The VPN Connection is not available."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__state__c"
right:
TEXT: "available"
- status: "COMPLIANT"
currentStateMessage: "Both VPN Connection tunnels are in the UP state."
check:
GREATER_THAN_EQUAL:
left:
RELATED_LIST_COUNT:
status: "COMPLIANT"
relationshipName: "CA10__vgwTelemetries__r"
right:
NUMBER: 2
- status: "INCOMPLIANT"
currentStateMessage: "One VPN Connection tunnel is not in the UP state."
remediationMessage: "This is often caused by a misconfiguration on the customer gateway device."
check:
IS_EQUAL:
left:
RELATED_LIST_COUNT:
status: "COMPLIANT"
relationshipName: "CA10__vgwTelemetries__r"
right:
NUMBER: 1
- status: "INCOMPLIANT"
currentStateMessage: "None of the VPN Connection tunnels are in the UP state."
remediationMessage: "This is often caused by a misconfiguration on the customer gateway device."
check:
IS_EQUAL:
left:
RELATED_LIST_COUNT:
status: "COMPLIANT"
relationshipName: "CA10__vgwTelemetries__r"
right:
NUMBER: 0
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."
relatedLists:
- relationshipName: "CA10__vgwTelemetries__r"
importExtracts:
- file: "/types/CA10__CaAwsVgwTelemetry__c/object.extracts.yaml"
conditions:
- status: "COMPLIANT"
currentStateMessage: "The tunnel is UP."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "UP"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "The tunnel is DOWN."