Skip to main content

🧠 AWS EBS Attached Volume is not encrypted - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“— AWS EBS VolumeCA10__CaAwsVolume__c211

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-07-25T15:25:56.876282863Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ extract('CA10__status__c') != 'in-use'βœ”οΈ null
🟒test3βœ”οΈ 299βœ”οΈ not(extract('CA10__encrypted__c'))βœ”οΈ null
🟒test4βœ”οΈ 399βœ”οΈ extract('CA10__encrypted__c') == trueβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/aws/ec2/ebs-volume-encryption/policy.yamlC9FE36ECE16261FC07E7A96411FA1923
Open/ce/ca/aws/ec2/ebs-volume-encryption/prod.logic.yaml0E3DD8C07F8D45D76A55B3340E47DB9A
Open/ce/ca/aws/ec2/ebs-volume-encryption/test-data.json5D8A8BDAA59D406ED79660015FBC5EED
Open/types/CA10__CaAwsVolume__c/object.extracts.yaml57B8E902583A8CF313EDFCBDDB88EC20

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/aws/ec2/ebs-volume-encryption/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/aws/ec2/ebs-volume-encryption/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/aws/ec2/ebs-volume-encryption/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/aws/ec2/ebs-volume-encryption/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/aws/ec2/ebs-volume-encryption/prod.logic.yaml

Content​

Open File

inputType: "CA10__CaAwsVolume__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10__CaAwsVolume__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This policy only applies to attached EBS volumes. This volume is not attached."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "in-use"
- status: "INCOMPLIANT"
currentStateMessage: "The attached EBS volume is not encrypted."
remediationMessage: "Enable encryption for the volume. "
check:
NOT:
arg:
EXTRACT: "CA10__encrypted__c"
- status: "COMPLIANT"
currentStateMessage: "The attached EBS volume is encrypted."
remediationMessage: "Enable encryption for the volume. "
check:
IS_EQUAL:
left:
EXTRACT: "CA10__encrypted__c"
right:
BOOLEAN: true
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the field."