Skip to main content

🧠 AWS VPC is not configured with a VPC Endpoint for Amazon EC2 service - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“— AWS VPCCA10__CaAwsVpc__c2

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-08-29T17:47:03.476754090Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ CA10__AWS_EC2_Instances__r.hasNo(COMPLIANT)βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ CA10__AWS_VPC_Endpoints__r.has(COMPLIANT)βœ”οΈ null
🟒test4βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null
🟒test5βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/vpc/no-ec2-vpc-endpoint/policy.yamlED2535C5D59E1A141B86985F181468FE
Open/ce/ca/aws/vpc/no-ec2-vpc-endpoint/prod.logic.yamlFC569F51B3062217B6FC65D33AB01823
Open/ce/ca/aws/vpc/no-ec2-vpc-endpoint/test-data.json7BFBC58DDAD61586C6E411FEBA00A2BC
Open/types/CA10__CaAwsVpcEndpoint__c/object.extracts.yamlA6696F89483514817E2BC1EB05B183F6

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/vpc/no-ec2-vpc-endpoint/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/vpc/no-ec2-vpc-endpoint/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/vpc/no-ec2-vpc-endpoint/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/vpc/no-ec2-vpc-endpoint/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/vpc/no-ec2-vpc-endpoint/prod.logic.yaml

Content​

Open File

inputType: "CA10__CaAwsVpc__c"
testData:
- file: "test-data.json"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This VPC doesn't have any EC2 Instances."
check:
RELATED_LIST_HAS_NO:
status: "COMPLIANT"
relationshipName: "CA10__AWS_EC2_Instances__r"
- status: "COMPLIANT"
currentStateMessage: "The VPC has an active VPC Endpoint for the EC2 service."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10__AWS_VPC_Endpoints__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "The VPC does not have an active VPC Endpoint for the EC2 service."
remediationMessage: "Consider creating a VPC Endpoint for the Amazon EC2 service to ensure that traffic between your VPC and EC2 does not leave the Amazon network."
relatedLists:
- relationshipName: "CA10__AWS_EC2_Instances__r"
conditions: []
otherwise:
status: "COMPLIANT"
currentStateMessage: "This is an EC2 Instance."
- relationshipName: "CA10__AWS_VPC_Endpoints__r"
importExtracts:
- file: /types/CA10__CaAwsVpcEndpoint__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "This is an active VPC Endpoint for the EC2 service."
check:
AND:
args:
- IS_EQUAL:
left:
EXTRACT: "CA10__endpointServiceId__c"
right:
TEXT: "ec2"
- IS_EQUAL:
left:
EXTRACT: "CA10__state__c"
right:
TEXT: "available"
otherwise:
status: "INAPPLICABLE"
currentStateMessage: "This is not an active VPC Endpoint for the EC2 service."