Skip to main content

🧠 AWS EC2 Auto Scaling Group behind ELB doesn't use ELB health check - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• AWS EC2 Auto Scaling GroupCA10__CaAwsAutoScalingGroup__c312

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:44:25.610153008Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r.hasNo(COMPLIANT)βœ”οΈ null
🟒test3βœ”οΈ 199βœ”οΈ CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r.hasNo(COMPLIANT)βœ”οΈ null
🟒test4βœ”οΈ 199βœ”οΈ CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r.hasNo(COMPLIANT)βœ”οΈ null
🟒test5βœ”οΈ 299βœ”οΈ not(extract('CA10__healthCheckType__c').contains('ELB'))βœ”οΈ null
🟒test6βœ”οΈ 399βœ”οΈ extract('CA10__healthCheckType__c').contains('ELB')βœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/policy.yaml4C2B53ACF31B1CE0F665F3F5AE50F52B
Open/ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yamlBDFAD3F7A248432F95EFD92026833D66
Open/types/CA10__CaAwsAutoScalingGroupTrafficSourceLink__c/object.extracts.yaml5D75919837EC6FE643E714B0EB120E9F
Open/types/CA10__CaAwsAutoScalingGroup__c/object.extracts.yamlDD41D736933C31B7EA43278E6396A5FC
Open/ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/test-data.jsonC079D116AE211EE68A573FA2AE2008B0

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAwsAutoScalingGroup__c"
importExtracts:
- file: "/types/CA10__CaAwsAutoScalingGroupTrafficSourceLink__c/object.extracts.yaml"
- file: "/types/CA10__CaAwsAutoScalingGroup__c/object.extracts.yaml"
testData:
- file: "test-data.json"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The AGS is not associated with a Load Balancer."
check:
RELATED_LIST_HAS_NO:
relationshipName: "CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r"
status: "COMPLIANT"
- status: "INCOMPLIANT"
currentStateMessage: "The AGS behind ELB does not use ELB health check."
remediationMessage: "Configure Auto Scaling Group to use ELB health check."
check:
NOT:
arg:
CONTAINS:
arg:
EXTRACT: "CA10__healthCheckType__c"
substring:
TEXT: "ELB"
- status: "COMPLIANT"
currentStateMessage: "The ASG uses ELB health check."
check:
CONTAINS:
arg:
EXTRACT: "CA10__healthCheckType__c"
substring:
TEXT: "ELB"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."
relatedLists:
- relationshipName: "CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r"
conditions:
- status: "COMPLIANT"
currentStateMessage: "The ASG traffic source is a Classic Load Balancer."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__trafficSourceType__c"
right:
TEXT: "elb"
- status: "COMPLIANT"
currentStateMessage: "The ASG traffic source is an ELB target group."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__trafficSourceType__c"
right:
TEXT: "elbv2"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "Unrelated ASG traffic source."