Skip to main content

🧠 AWS VPC VPN Connection does not have both Tunnels up - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“— AWS VPC VPN ConnectionCA10__CaAwsVpnConnection__c111

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-09-02T01:30:56.865592414Z Open

ResultIdCondition IndexCondition TextRuntime 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​

FileMD5
Open/ce/ca/aws/vpc/vpn-connection-tunnels-not-up/policy.yaml78673DB9BF369DEE3CC49BE12CD9E9F9
Open/ce/ca/aws/vpc/vpn-connection-tunnels-not-up/prod.logic.yamlA10ACC9098B3E12714CDB49B33BE49B0
Open/ce/ca/aws/vpc/vpn-connection-tunnels-not-up/test-data.json700BC3417F0513EF493321B905A9BD46
Open/types/CA10__CaAwsVpnConnection__c/object.extracts.yaml9B5659A3C6F6C7E429E7C0679395C259
Open/types/CA10__CaAwsVgwTelemetry__c/object.extracts.yaml1256E8E9A9B830F090FC5D676BD63616

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​

Open File

---
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."