π§ AWS VPC is not configured with a VPC Endpoint for Amazon EC2 service - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/aws/vpc/no-ec2-vpc-endpoint/prod.logic.yaml
- Located in: π AWS VPC is not configured with a VPC Endpoint for Amazon EC2 service π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π AWS VPC | CA10__CaAwsVpc__c | 2 |
Usesβ
Test Results π’β
Generated at: 2025-08-29T17:47:03.476754090Z Open
Result | Id | Condition Index | Condition Text | Runtime 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β
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/vpc/no-ec2-vpc-endpoint/policy.yaml | ED2535C5D59E1A141B86985F181468FE |
Open | /ce/ca/aws/vpc/no-ec2-vpc-endpoint/prod.logic.yaml | FC569F51B3062217B6FC65D33AB01823 |
Open | /ce/ca/aws/vpc/no-ec2-vpc-endpoint/test-data.json | 7BFBC58DDAD61586C6E411FEBA00A2BC |
Open | /types/CA10__CaAwsVpcEndpoint__c/object.extracts.yaml | A6696F89483514817E2BC1EB05B183F6 |
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β
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."