π§ AWS EC2 Auto Scaling Group behind ELB doesn't use ELB health check - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π AWS EC2 Auto Scaling Group
- π AWS EC2 Auto Scaling Group - object.extracts.yaml
- π AWS EC2 Auto Scaling Group Tfc.Src.Link - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2026-02-10T22:32:34.184391001Z Open
| Result | Id | Condition Index | Condition Text | Runtime 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 Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/policy.yaml | 0DCD446A842F217D613CBD8EAFE3C85D |
| Open | /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml | D12A148D039518DE54F61BDA488A0BD4 |
| Open | /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/test-data.json | C079D116AE211EE68A573FA2AE2008B0 |
| Open | /types/CA10__CaAwsAutoScalingGroup__c/object.extracts.yaml | DD26D73C0CF43F8CE9CBE35D8241D89C |
| Open | /types/CA10__CaAwsAutoScalingGroupTrafficSourceLink__c/object.extracts.yaml | 5D75919837EC6FE643E714B0EB120E9F |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/autoscaling/group-with-elb-without-elb-health-check/prod.logic.yaml
Contentβ
---
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 ASG 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 ASG behind an ELB does not use ELB health checks."
remediationMessage: "Configure the Auto Scaling group to use ELB health checks."
check:
NOT:
arg:
CONTAINS:
arg:
EXTRACT: "CA10__healthCheckType__c"
search:
TEXT: "ELB"
- status: "COMPLIANT"
currentStateMessage: "The ASG uses ELB health checks."
check:
CONTAINS:
arg:
EXTRACT: "CA10__healthCheckType__c"
search:
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."