π§ AWS EC2 Auto Scaling Group and Classic Load Balancer AZs are inconsistent - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/aws/autoscaling/group-and-classic-lb-inconsistent-azs/prod.logic.yaml
- Located in: π AWS EC2 Auto Scaling Group and Classic Load Balancer AZs are inconsistent π π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π AWS EC2 Auto Scaling Group | CA10__CaAwsAutoScalingGroup__c | 3 | 1 | 2 |
Usesβ
- π AWS EC2 Auto Scaling Group - object.extracts.yaml
- π AWS ELB Load Balancer - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-04-24T23:44:24.090261611Z 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.has(INAPPLICABLE) | βοΈ null |
π’ | test3 | βοΈ 199 | βοΈ CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r.has(INAPPLICABLE) | βοΈ null |
π’ | test4 | βοΈ 299 | βοΈ CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r.has(INCOMPLIANT) | βοΈ null |
π’ | test5 | βοΈ 299 | βοΈ CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r.has(INCOMPLIANT) | βοΈ null |
π’ | test7 | βοΈ 399 | βοΈ CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r.has(COMPLIANT) | βοΈ null |
π’ | test8 | βοΈ 500 | βοΈ otherwise | βοΈ null |
π’ | test9 | βοΈ 499 | βοΈ CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r.has(UNDETERMINED) | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/autoscaling/group-and-classic-lb-inconsistent-azs/policy.yaml | 25E9AEDE7A1EBB869CBA366B98EB6EE3 |
Open | /ce/ca/aws/autoscaling/group-and-classic-lb-inconsistent-azs/prod.logic.yaml | 40CAA2A690FBF3082BE184F723A0EC4F |
Open | /ce/ca/aws/autoscaling/group-and-classic-lb-inconsistent-azs/test-data.json | C6A46D7E236057B52D0EDF37A3A2154B |
Open | /types/CA10__CaAwsAutoScalingGroup__c/object.extracts.yaml | DD41D736933C31B7EA43278E6396A5FC |
Open | /types/CA10__CaAwsLoadBalancer__c/object.extracts.yaml | 9B0F1EF468082165E868C853B7DDD997 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/aws/autoscaling/group-and-classic-lb-inconsistent-azs/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/autoscaling/group-and-classic-lb-inconsistent-azs/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/autoscaling/group-and-classic-lb-inconsistent-azs/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/autoscaling/group-and-classic-lb-inconsistent-azs/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/aws/autoscaling/group-and-classic-lb-inconsistent-azs/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsAutoScalingGroup__c"
testData:
- file: "test-data.json"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The AGS is linked to a LB through the Target Group or\
\ the Classic Load Balancer is not present is the CMDB."
check:
RELATED_LIST_HAS:
relationshipName: "CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r"
status: "INAPPLICABLE"
- status: "INCOMPLIANT"
currentStateMessage: "There is at least one incompliant related Classic Load Balancer."
remediationMessage: "Consider updating the AZs for either the Load Balancer\
\ or the Auto Scaling Group."
check:
RELATED_LIST_HAS:
relationshipName: "CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r"
status: "INCOMPLIANT"
- status: "COMPLIANT"
currentStateMessage: "Unable to determine if AZs match."
check:
RELATED_LIST_HAS:
relationshipName: "CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r"
status: "COMPLIANT"
- status: "UNDETERMINED"
currentStateMessage: "Unable to determine if AZs match."
check:
RELATED_LIST_HAS:
relationshipName: "CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r"
status: "UNDETERMINED"
otherwise:
status: "COMPLIANT"
currentStateMessage: "The Auto Scaling Group is not linked to an active Load Balancer."
relatedLists:
- relationshipName: "CA10__AWS_EC2_Auto_Scaling_Group_Tfc_Src_Links__r"
importExtracts:
- file: /types/CA10__CaAwsAutoScalingGroup__c/object.extracts.yaml
- file: /types/CA10__CaAwsLoadBalancer__c/object.extracts.yaml
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The AGS is linked to a LB through a Target Group or\
\ the Classic Load Balancer is not present is the CMDB."
check:
IS_EMPTY_LOOKUP: "CA10__loadBalancer__r"
- status: "INCOMPLIANT"
currentStateMessage: "The set of Availability Zones configured on the Auto\
\ Scaling Group does not match the set configured on Load Balancer."
remediationMessage: "Adjust the set of Availability Zones either on the Auto\
\ Scaling Group or the Load Balancer to match."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__autoScalingGroup__r.caExtract_availabilityZones_asCollection__c"
right:
EXTRACT: "CA10__loadBalancer__r.caExtract_availabilityZones_asCollection__c"
- status: "COMPLIANT"
currentStateMessage: "The set of Availability Zones configured on the Auto\
\ Scaling Group matches the set configured on Load Balancer."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__autoScalingGroup__r.caExtract_availabilityZones_asCollection__c"
right:
EXTRACT: "CA10__loadBalancer__r.caExtract_availabilityZones_asCollection__c"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unable to determine the AZs."