Skip to main content

🧠 AWS EC2 Auto Scaling Group behind ELB assigns public IP to instances - prod.logic.yaml🟒

Uses​

Test Results πŸŸ’β€‹

Generated at: 2026-02-10T22:32:32.847048308Z 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βœ”οΈ 299βœ”οΈ extract('CA10__launchConfigurationName__c').isEmpty()βœ”οΈ null
🟒test5βœ”οΈ 399βœ”οΈ isEmptyLookup('CA10__launchConfiguration__r')βœ”οΈ null
🟒test6βœ”οΈ 399βœ”οΈ isEmptyLookup('CA10__launchConfiguration__r')βœ”οΈ null
🟒test7βœ”οΈ 499βœ”οΈ extract('CA10__launchConfiguration__r.CA10__associatePublicIpAddress__c') == trueβœ”οΈ null
🟒test8βœ”οΈ 599βœ”οΈ extract('CA10__launchConfiguration__r.CA10__associatePublicIpAddress__c') == falseβœ”οΈ null

Generation Bundle​

FileMD5
Open/ce/ca/aws/autoscaling/group-config-public-ip-assignement/policy.yamlAD3EB572127163BFBD64802B8A84FFDA
Open/ce/ca/aws/autoscaling/group-config-public-ip-assignement/prod.logic.yamlE740FF33B003A6FE7BC6263162599569
Open/ce/ca/aws/autoscaling/group-config-public-ip-assignement/test-data.json60A5EE6525C71707FFC07B21C34E8A5C
Open/types/CA10__CaAwsLaunchConfiguration__c/object.extracts.yamlD241396D967C94BB1020E577F9ABD9D8
Open/types/CA10__CaAwsAutoScalingGroup__c/object.extracts.yamlDD26D73C0CF43F8CE9CBE35D8241D89C
Open/types/CA10__CaAwsAutoScalingGroupTrafficSourceLink__c/object.extracts.yaml5D75919837EC6FE643E714B0EB120E9F

Available Commands​

repo-manager policies generate FULL /ce/ca/aws/autoscaling/group-config-public-ip-assignement/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/autoscaling/group-config-public-ip-assignement/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/autoscaling/group-config-public-ip-assignement/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/autoscaling/group-config-public-ip-assignement/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/autoscaling/group-config-public-ip-assignement/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"
- file: "/types/CA10__CaAwsLaunchConfiguration__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: "INAPPLICABLE"
currentStateMessage: "The ASG does not use a launch configuration."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10__launchConfigurationName__c"
- status: "UNDETERMINED"
currentStateMessage: "The launch configuration does not exist in the CMDB."
check:
IS_EMPTY_LOOKUP: "CA10__launchConfiguration__r"
- status: "INCOMPLIANT"
currentStateMessage: "The launch configuration assigns a public IPv4 address to the group's instances."
remediationMessage: "Disable public IP assignment for instances behind a load balancer."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__launchConfiguration__r.CA10__associatePublicIpAddress__c"
right:
BOOLEAN: true
- status: "COMPLIANT"
currentStateMessage: "The Auto Scaling group does not assign public IP addresses to instances behind a load balancer."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__launchConfiguration__r.CA10__associatePublicIpAddress__c"
right:
BOOLEAN: false
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."